New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CREATE TABLE IF NOT EXISTS support #53
Comments
It is expected to add |
Hi, could I pick this up? |
Sure! 👍 |
Hi, @panarch.
So I plan to implement the following two features:
Both of these features need to determine whether a particular table exists first, and I have observed that I can use the |
And about transaction issue, you're right. Current implementation does not have transaction functionality. I'm planning to provide So, it would be ok to ignore transaction issue. And I'll also share major feature release plan soon.
|
Hey,
Are you sure about this behavior? From my experience, Create Table on an Existing Table does absolutely nothing at all. It doesn't harm the existing table either. What I tested is
Got 5 rows back |
No, that's certainly bug which must be fixed. |
You can try to create two tables with the same name but different structures, like:
|
Correct behavior can be this CREATE TABLE Test (
id INTEGER,
num INTEGER,
name TEXT
);
INSERT INTO Test (id, num, name) VALUES (1, 2, \"Hello\");
CREATE TABLE Test (
id INTEGER,
num INTEGER
);
# this should report an error, may be... StoreError::SchemaAlreadyExists
INSERT INTO Test (id, num, name) VALUES (1, 2, \"Hello\"); # this insert should run Current one has a bug. |
That's right. I will fix it. |
Another thing I see
Returns 2 rows, so the rows from the overwritten tables are still being counted, even though the structure has changed completely |
IF NOT EXISTS
syntax is not supported yet.Let's make it work.
The text was updated successfully, but these errors were encountered: