Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
praeclarum committed May 16, 2020
1 parent 3584a6d commit 9a66dc7
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions src/SQLite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -872,31 +872,31 @@ public SQLiteCommand CreateCommand (string cmdText, params object[] ps)
}

/// <summary>
/// Creates a new SQLiteCommand given the command text with arguments. Place a "[@:]VVV"
/// in the command text for each of the arguments.
/// </summary>
/// <param name="cmdText">
/// The fully escaped SQL.
/// </param>
/// <param name="args">
/// Arguments to substitute for the occurences of "[@:]VVV" in the command text.
/// </param>
/// <returns>
/// A <see cref="SQLiteCommand" />
/// </returns>
public SQLiteCommand CreateCommand(string cmdText, Dictionary<string, object> args)
{
if (!this._open)
throw SQLiteException.New(SQLite3.Result.Error, "Cannot create commands from unopened database");

SQLiteCommand cmd = NewCommand();
cmd.CommandText = cmdText;
foreach (var kv in args)
{
cmd.Bind(kv.Key, kv.Value);
}
return cmd;
}
/// Creates a new SQLiteCommand given the command text with named arguments. Place a "[@:$]VVV"
/// in the command text for each of the arguments. VVV represents an alphanumeric identifier.
/// For example, @name :name and $name can all be used in the query.
/// </summary>
/// <param name="cmdText">
/// The fully escaped SQL.
/// </param>
/// <param name="args">
/// Arguments to substitute for the occurences of "[@:$]VVV" in the command text.
/// </param>
/// <returns>
/// A <see cref="SQLiteCommand" />
/// </returns>
public SQLiteCommand CreateCommand (string cmdText, Dictionary<string, object> args)
{
if (!_open)
throw SQLiteException.New (SQLite3.Result.Error, "Cannot create commands from unopened database");

SQLiteCommand cmd = NewCommand ();
cmd.CommandText = cmdText;
foreach (var kv in args) {
cmd.Bind (kv.Key, kv.Value);
}
return cmd;
}

/// <summary>
/// Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?'
Expand Down

0 comments on commit 9a66dc7

Please sign in to comment.