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'm using the pure Sql builder (for sql server compiler). No Execution.
It seems to be impossible to build such statement:
UPDATE table SET column = @column
Again, i cannot use classic DB Parameters like "?" or something else, because we use our own SQL execution environment. We need the pure SQL-Statement with a "@var"-Literal.
I tried the following:
var query = new Query("testtable");
query.AsUpdate(new string[] { "abc" }, new object[] { new UnsafeLiteral("@abc") });
Without success. But with AsInsert, it works(!). Here are the results:
INSERT INTO [table] ([column]) VALUES (@column)
UPDATE [table] SET [column] = 'SqlKata.UnsafeLiteral'
By the way, you should move the Attributes (ColumnAttribute, ...) into another namespace, so they will not conflict with System.ObjectModel.Annotations.Schema. And even Dapper tries to float the namespace with a new ColumnAttribute, if using Dapper.Contrib. So, there's a lot of conflict potential.
The text was updated successfully, but these errors were encountered:
I'm using the pure Sql builder (for sql server compiler). No Execution.
It seems to be impossible to build such statement:
Again, i cannot use classic DB Parameters like "?" or something else, because we use our own SQL execution environment. We need the pure SQL-Statement with a "@var"-Literal.
I tried the following:
Without success. But with AsInsert, it works(!). Here are the results:
By the way, you should move the Attributes (ColumnAttribute, ...) into another namespace, so they will not conflict with System.ObjectModel.Annotations.Schema. And even Dapper tries to float the namespace with a new ColumnAttribute, if using Dapper.Contrib. So, there's a lot of conflict potential.
The text was updated successfully, but these errors were encountered: