@mikro-orm/sql 7.1.8-dev.8 → 7.1.8-dev.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -54,10 +54,10 @@ export class MySqlSchemaHelper extends SchemaHelper {
|
|
|
54
54
|
return sql;
|
|
55
55
|
}
|
|
56
56
|
getListTablesSQL() {
|
|
57
|
-
return `select table_name as table_name, nullif(table_schema, schema()) as schema_name, table_comment as table_comment, table_collation as table_collation from information_schema.tables where table_type = 'BASE TABLE' and table_schema = schema()`;
|
|
57
|
+
return `select table_name as table_name, nullif(table_schema, schema()) as schema_name, table_comment as table_comment, table_collation as table_collation from information_schema.tables where table_type = 'BASE TABLE' and table_schema = schema() order by table_name`;
|
|
58
58
|
}
|
|
59
59
|
getListViewsSQL() {
|
|
60
|
-
return `select table_name as view_name, nullif(table_schema, schema()) as schema_name, view_definition from information_schema.views where table_schema = schema()`;
|
|
60
|
+
return `select table_name as view_name, nullif(table_schema, schema()) as schema_name, view_definition from information_schema.views where table_schema = schema() order by table_name`;
|
|
61
61
|
}
|
|
62
62
|
async loadViews(schema, connection, schemaName, ctx) {
|
|
63
63
|
const views = await connection.execute(this.getListViewsSQL(), [], 'all', ctx);
|
|
@@ -372,6 +372,7 @@ export class MySqlSchemaHelper extends SchemaHelper {
|
|
|
372
372
|
from information_schema.routines r
|
|
373
373
|
where r.routine_schema = database()
|
|
374
374
|
and r.routine_type in ('PROCEDURE', 'FUNCTION')
|
|
375
|
+
order by r.routine_name
|
|
375
376
|
`;
|
|
376
377
|
const [rows, params] = await Promise.all([
|
|
377
378
|
connection.execute(sql),
|
|
@@ -579,6 +579,7 @@ export class PostgreSqlSchemaHelper extends SchemaHelper {
|
|
|
579
579
|
)
|
|
580
580
|
-- exclude trigger-helper functions; they're managed alongside their owning trigger.
|
|
581
581
|
and p.prorettype <> 'trigger'::regtype
|
|
582
|
+
order by n.nspname, p.proname
|
|
582
583
|
`;
|
|
583
584
|
const rows = await connection.execute(sql);
|
|
584
585
|
return rows.map(row => {
|
|
@@ -775,7 +776,8 @@ export class PostgreSqlSchemaHelper extends SchemaHelper {
|
|
|
775
776
|
left join pg_enum e on t.oid = e.enumtypid
|
|
776
777
|
join pg_catalog.pg_namespace n on n.oid = t.typnamespace
|
|
777
778
|
where t.typtype = 'e' and n.nspname in (${Array(uniqueSchemas.length).fill('?').join(', ')})
|
|
778
|
-
group by t.typname, n.nspname
|
|
779
|
+
group by t.typname, n.nspname
|
|
780
|
+
order by n.nspname, t.typname`, uniqueSchemas, 'all', ctx);
|
|
779
781
|
return res.reduce((o, row) => {
|
|
780
782
|
let name = row.enum_name;
|
|
781
783
|
if (row.schema_name && row.schema_name !== this.platform.getDefaultSchemaName()) {
|
|
@@ -52,7 +52,7 @@ export class SqliteSchemaHelper extends SchemaHelper {
|
|
|
52
52
|
for (const dbName of targetSchemas) {
|
|
53
53
|
const prefix = this.getSchemaPrefix(dbName);
|
|
54
54
|
const tables = await connection.execute(`select name from ${prefix}sqlite_master where type = 'table' ` +
|
|
55
|
-
`and name != 'sqlite_sequence' and name != 'geometry_columns' and name != 'spatial_ref_sys'`, [], 'all', ctx);
|
|
55
|
+
`and name != 'sqlite_sequence' and name != 'geometry_columns' and name != 'spatial_ref_sys' order by name`, [], 'all', ctx);
|
|
56
56
|
for (const t of tables) {
|
|
57
57
|
allTables.push({ table_name: t.name, schema_name: dbName });
|
|
58
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/sql",
|
|
3
|
-
"version": "7.1.8-dev.
|
|
3
|
+
"version": "7.1.8-dev.9",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@mikro-orm/core": "^7.1.7"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@mikro-orm/core": "7.1.8-dev.
|
|
56
|
+
"@mikro-orm/core": "7.1.8-dev.9"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">= 22.17.0"
|