You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I don't understand something.
I'm working with SQLpage and sqlite for my apli 'Ecole Inclusive'
I have do use IGNORE instead of ON CONFLICT ... DO NOTHING
In another case, SQLpage return an error (near "DO" : syntax error)
For example in this file comptes_upload.sql :
-- insert the data into the final table
INSERT OR IGNORE INTO user_info (username, password_hash, nom, prenom, tel, courriel, groupe)
select username, password, nom, prenom, tel, courriel, CAST(groupe ASinteger) from user_tmp;
But, in an another file create_user.sql :
INSERT INTO user_info (username, password_hash, nom, prenom, groupe, tel, courriel)
VALUES (:username, sqlpage.hash_password(:password), :nom, :prenom, :groupe, :tel, :courriel)
ON CONFLICT (username) DO NOTHING
RETURNING
'redirect'AS component,
'create_user_welcome_message.sql?username='|| :username AS link;
the clause DO NOTHING don't return error and all is ok.
How can we explain this incredible behaviour ?
The phrase "ON CONFLICT" is also part of UPSERT, which is an extension to INSERT added in version 3.24.0 (2018-06-04). Do not confuse these two separate uses of the "ON CONFLICT" phrase.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I don't understand something.
I'm working with SQLpage and sqlite for my apli 'Ecole Inclusive'
I have do use IGNORE instead of ON CONFLICT ... DO NOTHING
In another case, SQLpage return an error (near "DO" : syntax error)
For example in this file comptes_upload.sql :
But, in an another file create_user.sql :
the clause DO NOTHING don't return error and all is ok.
How can we explain this incredible behaviour ?
All reactions