diff --git a/packages/server/src/api/routes/tests/search.spec.ts b/packages/server/src/api/routes/tests/search.spec.ts index 57afdb4853..4c7410eb76 100644 --- a/packages/server/src/api/routes/tests/search.spec.ts +++ b/packages/server/src/api/routes/tests/search.spec.ts @@ -1577,7 +1577,7 @@ describe.each([ }) }) - describe.only("bigints", () => { + describe("bigints", () => { const SMALL = "1" const MEDIUM = "10000000" diff --git a/packages/server/src/integrations/oracle.ts b/packages/server/src/integrations/oracle.ts index b36501525b..6b86fba00d 100644 --- a/packages/server/src/integrations/oracle.ts +++ b/packages/server/src/integrations/oracle.ts @@ -365,6 +365,18 @@ class OracleIntegration extends Sql implements DatasourcePlus { fetchTypeHandler: function (metaData) { if (metaData.dbType === oracledb.CLOB) { return { type: oracledb.STRING } + } else if ( + // When we create a new table in OracleDB from Budibase, bigints get + // created as NUMBER(20,0). Budibase expects bigints to be returned + // as strings, which is what we're doing here. However, this is + // likely to be brittle if we connect to externally created + // databases that have used different precisions and scales. + // We shold find a way to do better. + metaData.dbType === oracledb.NUMBER && + metaData.precision === 20 && + metaData.scale === 0 + ) { + return { type: oracledb.STRING } } return undefined }, diff --git a/packages/server/src/utilities/rowProcessor/index.ts b/packages/server/src/utilities/rowProcessor/index.ts index a367c6da1e..71de056814 100644 --- a/packages/server/src/utilities/rowProcessor/index.ts +++ b/packages/server/src/utilities/rowProcessor/index.ts @@ -315,13 +315,6 @@ export async function outputProcessing( column.subtype ) } - } else if (column.type === FieldType.BIGINT) { - for (const row of enriched) { - if (row[property] == null) { - continue - } - row[property] = row[property].toString() - } } }