12 command.
CommandText =
"CREATE TABLE IF NOT EXISTS TestTable (" +
15 " var_name VARCHAR(200)" +
21 DeveelDbCommand command = Connection.CreateCommand(
"DROP TABLE TestTable");
32 DateTime start = DateTime.Now;
34 for (
int i = 0; i < 1000; i++) {
35 command = Connection.CreateCommand();
36 command.
CommandText =
"INSERT INTO TestTable (inc, var_name) VALUES (?, ?)";
42 DateTime end = DateTime.Now;
43 Console.Out.WriteLine(
"Inserted 1000 rows in {0}.", (end - start));
45 command = Connection.CreateCommand(
"SELECT COUNT(*) FROM TestTable");
48 Assert.AreEqual(1000, count.ToInt32(),
"Not all the rows were inserted");
56 Console.Out.WriteLine(
"Rolled-back in {0}", (end - start));
58 command = Connection.CreateCommand(
"SELECT COUNT(*) FROM TestTable");
61 Assert.AreEqual(0, count,
"After rollback there shouldn't be any rows in the table.");
71 DateTime start = DateTime.Now;
73 for (
int i = 0; i < 1000; i++) {
74 command.
CommandText =
"INSERT INTO TestTable (inc, var_name) VALUES (?, ?)";
80 DateTime end = DateTime.Now;
81 Console.Out.WriteLine(
"Inserted 1000 rows in {0}.", (end - start));
89 Console.Out.WriteLine(
"Committed in {0}.", (end - start));
91 command = Connection.CreateCommand(
"SELECT COUNT(*) FROM TestTable");
94 Console.Out.WriteLine(
"Numer of rows inserted into TestTable : {0}", count);
new DeveelDbParameterCollection Parameters
override string CommandText
override object ExecuteScalar()
override int ExecuteNonQuery()
override int Add(object value)