mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 09:56:01 +00:00
fixed loading structure for firebird
This commit is contained in:
@@ -124,7 +124,7 @@ class Analyser extends DatabaseAnalyser {
|
|||||||
uniques: uniques.filter(unique => unique.pureName === table.pureName),
|
uniques: uniques.filter(unique => unique.pureName === table.pureName),
|
||||||
indexes: indexes.filter(index => index.pureName === table.pureName),
|
indexes: indexes.filter(index => index.pureName === table.pureName),
|
||||||
})) ?? [];
|
})) ?? [];
|
||||||
console.log(uniques);
|
// console.log(uniques);
|
||||||
|
|
||||||
const views =
|
const views =
|
||||||
viewsResults.rows?.map(view => ({
|
viewsResults.rows?.map(view => ({
|
||||||
|
|||||||
@@ -126,7 +126,5 @@ module.exports = {
|
|||||||
getTriggerTiming,
|
getTriggerTiming,
|
||||||
getFormattedDefaultValue,
|
getFormattedDefaultValue,
|
||||||
getTriggerCreateSql,
|
getTriggerCreateSql,
|
||||||
blobStreamToString,
|
|
||||||
normalizeRow,
|
|
||||||
createFirebirdInsertStream,
|
createFirebirdInsertStream,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ SELECT
|
|||||||
TRIM(F.RDB$FUNCTION_NAME) AS "objectId",
|
TRIM(F.RDB$FUNCTION_NAME) AS "objectId",
|
||||||
TRIM('FUNCTION') AS "objectTypeField",
|
TRIM('FUNCTION') AS "objectTypeField",
|
||||||
TRIM(F.RDB$DESCRIPTION) AS "objectComment",
|
TRIM(F.RDB$DESCRIPTION) AS "objectComment",
|
||||||
F.RDB$FUNCTION_SOURCE AS "createSql", -- This is the PSQL body or definition for UDRs
|
CAST(SUBSTRING(F.RDB$FUNCTION_SOURCE FROM 1 FOR 5000) AS VARCHAR(5000)) AS "createSql",
|
||||||
FALSE AS "requiresFormat" -- Assuming PSQL source is generally readable
|
FALSE AS "requiresFormat" -- Assuming PSQL source is generally readable
|
||||||
FROM
|
FROM
|
||||||
RDB$FUNCTIONS F
|
RDB$FUNCTIONS F
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ SELECT -- Index name, maps to pureName
|
|||||||
WHEN I.RDB$EXPRESSION_SOURCE IS NOT NULL THEN TRIM('expression') -- indexType: if an expression index [cite: 46, 262]
|
WHEN I.RDB$EXPRESSION_SOURCE IS NOT NULL THEN TRIM('expression') -- indexType: if an expression index [cite: 46, 262]
|
||||||
ELSE TRIM('normal')
|
ELSE TRIM('normal')
|
||||||
END AS "indexType",
|
END AS "indexType",
|
||||||
I.RDB$CONDITION_SOURCE AS "idx_filterDefinition", -- filterDefinition: for partial indexes [cite: 46, 261, 838]
|
-- I.RDB$CONDITION_SOURCE AS "idx_filterDefinition", -- filterDefinition: for partial indexes [cite: 46, 261, 838]
|
||||||
COALESCE(I.RDB$INDEX_INACTIVE, 0) AS "idx_isInactive", -- 0 for active, 1 for inactive [cite: 46, 838]
|
COALESCE(I.RDB$INDEX_INACTIVE, 0) AS "idx_isInactive", -- 0 for active, 1 for inactive [cite: 46, 838]
|
||||||
I.RDB$DESCRIPTION AS "idx_description", -- Index description/comment [cite: 46, 838]
|
I.RDB$DESCRIPTION AS "idx_description", -- Index description/comment [cite: 46, 838]
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ SELECT
|
|||||||
TRIM(P.RDB$PROCEDURE_NAME) AS "pureName",
|
TRIM(P.RDB$PROCEDURE_NAME) AS "pureName",
|
||||||
TRIM('PROCEDURE') AS "objectTypeField",
|
TRIM('PROCEDURE') AS "objectTypeField",
|
||||||
TRIM(P.RDB$DESCRIPTION) AS "objectComment",
|
TRIM(P.RDB$DESCRIPTION) AS "objectComment",
|
||||||
P.RDB$PROCEDURE_SOURCE AS "createSql", -- Contains the PSQL body
|
CAST(SUBSTRING(P.RDB$PROCEDURE_SOURCE FROM 1 FOR 5000) AS VARCHAR(5000)) AS "createSql",
|
||||||
FALSE AS "requiresFormat"
|
FALSE AS "requiresFormat"
|
||||||
FROM
|
FROM
|
||||||
RDB$PROCEDURES P
|
RDB$PROCEDURES P
|
||||||
|
|||||||
Reference in New Issue
Block a user