protected virtual int ExecuteNonQuery(string sql) { IPooledDbConnection conn = connectionPool.Request(); int result = conn.ExecuteNonQuery(sql); conn.Release(); return(result); }
//http://www.sqlite.org/lang_createview.html public override void CreateView(ViewSchema view) { IPooledDbConnection conn = connectionPool.Request(); IDbCommand command = conn.CreateCommand(view.Definition); using (command) conn.ExecuteNonQuery(command); conn.Release(); }
private void OnCreateTableThreaded(object state) { object[] objs = state as object[]; ISchemaProvider provider = objs[0] as ISchemaProvider; TableSchema table = objs[1] as TableSchema; BaseNode node = objs[2] as BaseNode; LoggingService.LogDebug("ADD TABLE: {0}", table.Definition); IPooledDbConnection conn = provider.ConnectionPool.Request(); conn.ExecuteNonQuery(table.Definition); conn.Release(); node.Refresh(); }