Closed davidmartos96 closed 2 weeks ago
I'm running into an issue when using the drift_postgres package that doesn't occurr when using the postgres package.
drift_postgres
postgres
For the following table:
CREATE TABLE IF NOT EXISTS public.parent ( id INTEGER PRIMARY KEY NOT NULL, value TEXT, other INTEGER DEFAULT 0 );
This works using postgres:
await db.execute(''' INSERT INTO public.parent (id, value, other) VALUES (3, 'hi', \$1); ''', parameters: [null], );
This doesn't work using drift
await db.customInsert(''' INSERT INTO public.parent (id, value, other) VALUES (3, 'hi', \$1); ''', variables: [Variable(null)]);
The error is Severity.error 42804: column "other" is of type integer but expression is of type text hint: You will need to rewrite or cast the expression.
Severity.error 42804: column "other" is of type integer but expression is of type text hint: You will need to rewrite or cast the expression.
Thanks for the help finding and fixing this, I've released version 1.2.2.
I'm running into an issue when using the
drift_postgres
package that doesn't occurr when using thepostgres
package.For the following table:
This works using postgres:
This doesn't work using drift
The error is
Severity.error 42804: column "other" is of type integer but expression is of type text hint: You will need to rewrite or cast the expression.