From 6757addfb6701fc05e9816ac7ba586f038cfdeec Mon Sep 17 00:00:00 2001 From: Guillaume DELVIT Date: Wed, 22 May 2024 20:38:21 +0200 Subject: [PATCH] Remove obsolete comment. ON CONFLICT (xxx) DO NOTHING is natively supported by sqlite. https://sqlite.org/lang_upsert.html --- examples/user-authentication/create_user.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/user-authentication/create_user.sql b/examples/user-authentication/create_user.sql index c4046c18..e441ed63 100644 --- a/examples/user-authentication/create_user.sql +++ b/examples/user-authentication/create_user.sql @@ -1,10 +1,10 @@ INSERT INTO user_info (username, password_hash) VALUES (:username, sqlpage.hash_password(:password)) -ON CONFLICT (username) DO NOTHING -- this syntax is PostgreSQL-specific. In SQLite, use ON CONFLICT IGNORE. +ON CONFLICT (username) DO NOTHING RETURNING 'redirect' AS component, 'create_user_welcome_message.sql?username=' || :username AS link; -- If we are still here, it means that the user was not created -- because the username was already taken. -SELECT 'redirect' AS component, 'create_user_welcome_message.sql?error&username=' || :username AS link; \ No newline at end of file +SELECT 'redirect' AS component, 'create_user_welcome_message.sql?error&username=' || :username AS link;