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
I created a database on my local machine, and for some reason two strange things happen when I'm using SQLDelight :
Running MyDb.Schema.create(dataSource.asJdbcDriver())doesn't create the table "users".
because of 1, I manually created the users table (through some postgres client).
But then :
"getUsers" (SELECT query) --> does work.
"addUser" (INSERT query) --> doesn't work.
kotlin/repository/postgres/sql/Users.sq :
CREATE TABLE users (
id SERIAL8 PRIMARY KEY,
name VARCHAR NOT NULL,
last_name VARCHAR
);
addUser:
INSERT INTO users(name, last_name) VALUES (?, ?);
getUsers:
SELECT * FROM users;
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
-
I created a database on my local machine, and for some reason two strange things happen when I'm using SQLDelight :
Running
MyDb.Schema.create(dataSource.asJdbcDriver())
doesn't create the table "users".because of 1, I manually created the
users
table (through some postgres client).But then :
"getUsers" (SELECT query) --> does work.
"addUser" (INSERT query) --> doesn't work.
kotlin/repository/postgres/sql/Users.sq :
Gradle file :
Main.kt :
Am I missing something or is that a bug of some sort?
Beta Was this translation helpful? Give feedback.
All reactions