mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
oracle: detect autoincrement column
This commit is contained in:
parent
2d1ac97191
commit
ebdcd9ad94
@ -22,25 +22,7 @@ function getColumnInfo(
|
|||||||
if (char_max_length && isTypeString(normDataType)) fullDataType = `${normDataType}(${char_max_length})`;
|
if (char_max_length && isTypeString(normDataType)) fullDataType = `${normDataType}(${char_max_length})`;
|
||||||
if (numeric_precision && numeric_ccale && isTypeNumeric(normDataType))
|
if (numeric_precision && numeric_ccale && isTypeNumeric(normDataType))
|
||||||
fullDataType = `${normDataType}(${numeric_precision},${numeric_ccale})`;
|
fullDataType = `${normDataType}(${numeric_precision},${numeric_ccale})`;
|
||||||
const autoIncrement = !!(default_value && default_value.startsWith('nextval('));
|
const autoIncrement = !!(default_value && default_value.endsWith('.nextval'));
|
||||||
if (
|
|
||||||
table &&
|
|
||||||
geometryColumns &&
|
|
||||||
geometryColumns.rows.find(
|
|
||||||
x => x.schema_name == table.schemaName && x.pure_name == table.pureName && x.column_name == column_name
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
fullDataType = 'geometry';
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
table &&
|
|
||||||
geographyColumns &&
|
|
||||||
geographyColumns.rows.find(
|
|
||||||
x => x.schema_name == table.schemaName && x.pure_name == table.pureName && x.column_name == column_name
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
fullDataType = 'geography';
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
columnName: column_name,
|
columnName: column_name,
|
||||||
dataType: fullDataType,
|
dataType: fullDataType,
|
||||||
|
Loading…
Reference in New Issue
Block a user