route/vendor/github.com/gchaincl/dotsql/test_schema.sql

16 lines
340 B
SQL

-- name: create-users-table
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
name VARCHAR(255),
email VARCHAR(255)
);
-- name: create-user
INSERT INTO users (name, email) VALUES(?, ?)
-- name: find-one-user-by-email
SELECT id,name,email FROM users WHERE email = ? LIMIT 1
-- name: drop-users-table
DROP TABLE users