-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is it possible to used named parameters in PreparedStatement? For example, in my old code, I have "WHERE Entries MATCH @query" and in C# before I would use bind("@query", "stuff"), and then execute.
https://sqlite.org/c3ref/bind_blob.html
My old code had:
cmdAttachDatabase.Bind("@dbname", DbName);
cmdAttachDatabase.Bind("@dbfullpath", _initDbPath); // This may contain the CEROD password
SQLite3.Result result = (SQLite3.Result)cmdAttachDatabase.ExecuteNonQuery();
if (result != SQLite3.Result.OK)
{
throw new Exception("Unable to attach database");
}
with
internal static string AttachDatabase
{
get
{
return @"ATTACH @dbfullpath AS @dbname;";
}
}
https://sqlite.org/c3ref/bind_parameter_index.html
An execute
and select
that takes Map<String, Object?>
might do the trick.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request