File tree Expand file tree Collapse file tree 6 files changed +6
-6
lines changed
FreeSql.Provider.Custom/MySql
FreeSql.Provider.Odbc/MySql Expand file tree Collapse file tree 6 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ from information_schema.columns a
256256select
257257a.column_name,
258258a.index_name 'index_id',
259- 0 'IsDesc',
259+ case when a.collation = 'D' then 1 else 0 end 'IsDesc',
260260case when a.non_unique = 0 then 1 else 0 end 'IsUnique'
261261from information_schema.statistics a
262262where a.table_schema IN ({0}) and a.table_name IN ({1}) and a.index_name <> 'PRIMARY'" , tboldname ?? tbname ) ;
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ from information_schema.columns a
299299case when a.non_unique = 0 then 1 else 0 end 'IsUnique',
300300case when a.index_name = 'PRIMARY' then 1 else 0 end 'IsPrimaryKey',
3013010 'IsClustered',
302- 0 'IsDesc'
302+ case when a.collation = 'D' then 1 else 0 end 'IsDesc'
303303from information_schema.statistics a
304304where { ( ignoreCase ? "lower(a.table_schema)" : "a.table_schema" ) } in ({ databaseIn } ) and { loc8 }
305305" ;
Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ from information_schema.columns a
267267select
268268a.column_name,
269269a.index_name 'index_id',
270- 0 'IsDesc',
270+ case when a.collation = 'D' then 1 else 0 end 'IsDesc',
271271case when a.non_unique = 0 then 1 else 0 end 'IsUnique'
272272from information_schema.statistics a
273273where a.table_schema IN ({0}) and a.table_name IN ({1}) and a.index_name <> 'PRIMARY'" , tboldname ?? tbname ) ;
Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ from information_schema.columns a
332332case when a.non_unique = 0 then 1 else 0 end 'IsUnique',
333333case when a.index_name = 'PRIMARY' then 1 else 0 end 'IsPrimaryKey',
3343340 'IsClustered',
335- 0 'IsDesc'
335+ case when a.collation = 'D' then 1 else 0 end 'IsDesc'
336336from information_schema.statistics a
337337where { ( ignoreCase ? "lower(a.table_schema)" : "a.table_schema" ) } in ({ databaseIn } ) and { loc8 }
338338" ;
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ from information_schema.columns a
257257select
258258a.column_name,
259259a.index_name 'index_id',
260- 0 'IsDesc',
260+ case when a.collation = 'D' then 1 else 0 end 'IsDesc',
261261case when a.non_unique = 0 then 1 else 0 end 'IsUnique'
262262from information_schema.statistics a
263263where a.table_schema IN ({0}) and a.table_name IN ({1}) and a.index_name <> 'PRIMARY'" , tboldname ?? tbname ) ;
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ from information_schema.columns a
298298case when a.non_unique = 0 then 1 else 0 end 'IsUnique',
299299case when a.index_name = 'PRIMARY' then 1 else 0 end 'IsPrimaryKey',
3003000 'IsClustered',
301- 0 'IsDesc'
301+ case when a.collation = 'D' then 1 else 0 end 'IsDesc'
302302from information_schema.statistics a
303303where { ( ignoreCase ? "lower(a.table_schema)" : "a.table_schema" ) } in ({ databaseIn } ) and { loc8 }
304304" ;
You can’t perform that action at this time.
0 commit comments