mirror of
https://github.com/dbgate/dbgate
synced 2024-11-21 23:39:46 +00:00
This commit is contained in:
parent
0d7d0bdd60
commit
1ccdf7f07e
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"jestrunner.jestCommand": "node_modules/.bin/cross-env DEVMODE=1 LOCALTEST=1 node_modules/.bin/jest"
|
||||||
|
}
|
@ -109,7 +109,7 @@ class Analyser extends DatabaseAnalyser {
|
|||||||
.map(getColumnInfo),
|
.map(getColumnInfo),
|
||||||
})),
|
})),
|
||||||
procedures: routines.rows
|
procedures: routines.rows
|
||||||
.filter(x => x.objectType == 'PROCEDURE')
|
.filter(x => x.object_type == 'PROCEDURE')
|
||||||
.map(proc => ({
|
.map(proc => ({
|
||||||
objectId: `procedures:${proc.schema_name}.${proc.pure_name}`,
|
objectId: `procedures:${proc.schema_name}.${proc.pure_name}`,
|
||||||
pureName: proc.pure_name,
|
pureName: proc.pure_name,
|
||||||
@ -117,7 +117,7 @@ class Analyser extends DatabaseAnalyser {
|
|||||||
contentHash: proc.hash_code,
|
contentHash: proc.hash_code,
|
||||||
})),
|
})),
|
||||||
functions: routines.rows
|
functions: routines.rows
|
||||||
.filter(x => x.objectType == 'FUNCTION')
|
.filter(x => x.object_type == 'FUNCTION')
|
||||||
.map(func => ({
|
.map(func => ({
|
||||||
objectId: `functions:${func.schema_name}.${func.pure_name}`,
|
objectId: `functions:${func.schema_name}.${func.pure_name}`,
|
||||||
pureName: func.pure_name,
|
pureName: func.pure_name,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
module.exports = `
|
module.exports = `
|
||||||
select
|
select
|
||||||
routine_name as "pureName",
|
routine_name as "pure_name",
|
||||||
routine_schema as "schemaName",
|
routine_schema as "schema_name",
|
||||||
routine_definition as "createSql",
|
routine_definition as "create_sql",
|
||||||
md5(routine_definition) as "hashCode",
|
md5(routine_definition) as "hash_code",
|
||||||
routine_type as "objectType"
|
routine_type as "object_type"
|
||||||
from
|
from
|
||||||
information_schema.routines where routine_schema != 'information_schema' and routine_schema != 'pg_catalog'
|
information_schema.routines where routine_schema != 'information_schema' and routine_schema != 'pg_catalog'
|
||||||
and (
|
and (
|
||||||
|
Loading…
Reference in New Issue
Block a user