static string GetInsertSql(AnyDbConnection cnn, Insert query) { ISqlOmRenderer renderer = Qb.CreateRenderer(cnn.DatabaseProvider); string sql = renderer.RenderInsert(query); return(sql); }
public long ExecuteNonQuery(Insert query) { ISqlOmRenderer render = Qb.CreateRenderer(_anyConnection.DatabaseProvider); _dbCommand.CommandText = render.RenderInsert(query); _dbCommand.CommandType = CommandType.Text; FillParameters(_dbCommand, query.Query.CommandParams, render); if (!string.IsNullOrEmpty(query.Query.IdentityField)) { return(Convert.ToInt64(ExecuteScalar())); } return(ExecuteNonQuery()); }
public string GetSql(Insert query) { ISqlOmRenderer renderer = Qb.CreateRenderer(AnyDbSetting.DatabaseProvider); return(renderer.RenderInsert(query)); }