Browse Source

fix(gui): convert column name to lower case and compare

in oracle column names are kept as capital
feat/oracle-support
Pranav C 2 years ago committed by Pranav C
parent
commit
0daded1995
  1. 4
      packages/nc-gui/composables/useTable.ts

4
packages/nc-gui/composables/useTable.ts

@ -39,13 +39,13 @@ export function useTable(onTableCreate?: (tableMeta: TableType) => void, baseId?
const createTable = async () => {
if (!sqlUi?.value) return
const columns = sqlUi?.value?.getNewTableColumns().filter((col) => {
if (col.column_name === 'id' && table.columns.includes('id_ag')) {
if (col.column_name.toLowerCase() === 'id' && table.columns.includes('id_ag')) {
Object.assign(col, sqlUi?.value?.getDataTypeForUiType({ uidt: UITypes.ID }, 'AG'))
col.dtxp = sqlUi?.value?.getDefaultLengthForDatatype(col.dt)
col.dtxs = sqlUi?.value?.getDefaultScaleForDatatype(col.dt)
return true
}
return table.columns.includes(col.column_name)
return table.columns.includes(col.column_name.toLowerCase())
})
try {

Loading…
Cancel
Save