You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 24, 2022. It is now read-only.
sql="SELECT COUNT(*) FROM pg_class JOIN pg_catalog.pg_namespace n ON n.oid = pg_class.relnamespace WHERE relname = {0} AND nspname = {1}"
176
-
.SqlFmt(tableName,schema);
276
+
sql=!Normalize
277
+
?"SELECT COUNT(*) FROM pg_class JOIN pg_catalog.pg_namespace n ON n.oid = pg_class.relnamespace WHERE relname = {0} AND nspname = {1}".SqlFmt(tableName,schema)
278
+
:"SELECT COUNT(*) FROM pg_class JOIN pg_catalog.pg_namespace n ON n.oid = pg_class.relnamespace WHERE lower(relname) = {0} AND lower(nspname) = {1}".SqlFmt(tableName.ToLower(),schema.ToLower());
177
279
}
178
280
179
281
varresult=dbCmd.ExecLongScalar(sql);
@@ -183,11 +285,19 @@ public override bool DoesTableExist(IDbCommand dbCmd, string tableName, string s
varsql="SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = @tableName AND COLUMN_NAME = @columnName"
187
-
.SqlFmt(tableName,columnName);
288
+
varsql=!Normalize
289
+
?"SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = @tableName AND COLUMN_NAME = @columnName".SqlFmt(tableName,columnName)
290
+
:"SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE lower(TABLE_NAME) = @tableName AND lower(COLUMN_NAME) = @columnName".SqlFmt(tableName.ToLower(),columnName.ToLower());
q.Where<Team,TeamUser>((t,u)=>Sql.JoinAlias(t.Id,q.DialectProvider.GetQuotedTableName(ModelDefinition<Team>.Definition))==Sql.JoinAlias(u.TeamId,"Leader"));// Workaround, but only works for fields, not constants
q.Where<Team,Teamuser>((t,u)=>Sql.JoinAlias(t.Id,q.DialectProvider.GetQuotedTableName(ModelDefinition<Team>.Definition))==Sql.JoinAlias(u.TeamId,"Leader"));// Workaround, but only works for fields, not constants
0 commit comments