postgresql-dart icon indicating copy to clipboard operation
postgresql-dart copied to clipboard

Substitute value error

Open Iskren1990 opened this issue 4 years ago • 1 comments

Use case

await connection.transaction((ctx) async { await ctx.query("INSERT INTO table (message) VALUES (server@localhost:5432/ep)"); });

Should be valid. Instead it throws substitute value error, while we do not need substitution. Suggestion, in case no substitution values are provided use the provided string.

Iskren1990 avatar Sep 21 '21 09:09 Iskren1990

Hey @Iskren1990

If I'm understanding when you quote the text string does it work?

await connection.transaction((ctx) async { await ctx.query("INSERT INTO table (message) VALUES ('server@localhost:5432/ep')"); });

zambetpentru avatar Oct 11 '21 07:10 zambetpentru