Merge branch 'master' into BUDI-8508/sql-support-for-logical-operators
This commit is contained in:
commit
2074ebd0f7
|
@ -164,6 +164,7 @@ describe("/datasources", () => {
|
||||||
[DatabaseName.MYSQL, getDatasource(DatabaseName.MYSQL)],
|
[DatabaseName.MYSQL, getDatasource(DatabaseName.MYSQL)],
|
||||||
[DatabaseName.SQL_SERVER, getDatasource(DatabaseName.SQL_SERVER)],
|
[DatabaseName.SQL_SERVER, getDatasource(DatabaseName.SQL_SERVER)],
|
||||||
[DatabaseName.MARIADB, getDatasource(DatabaseName.MARIADB)],
|
[DatabaseName.MARIADB, getDatasource(DatabaseName.MARIADB)],
|
||||||
|
[DatabaseName.ORACLE, getDatasource(DatabaseName.ORACLE)],
|
||||||
])("%s", (_, dsProvider) => {
|
])("%s", (_, dsProvider) => {
|
||||||
let rawDatasource: Datasource
|
let rawDatasource: Datasource
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
|
@ -285,9 +286,6 @@ describe("/datasources", () => {
|
||||||
[FieldType.STRING]: {
|
[FieldType.STRING]: {
|
||||||
name: stringName,
|
name: stringName,
|
||||||
type: FieldType.STRING,
|
type: FieldType.STRING,
|
||||||
constraints: {
|
|
||||||
presence: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
[FieldType.LONGFORM]: {
|
[FieldType.LONGFORM]: {
|
||||||
name: "longform",
|
name: "longform",
|
||||||
|
@ -381,10 +379,6 @@ describe("/datasources", () => {
|
||||||
),
|
),
|
||||||
schema: Object.entries(table.schema).reduce<TableSchema>(
|
schema: Object.entries(table.schema).reduce<TableSchema>(
|
||||||
(acc, [fieldName, field]) => {
|
(acc, [fieldName, field]) => {
|
||||||
// the constraint will be unset - as the DB doesn't recognise it as not null
|
|
||||||
if (fieldName === stringName) {
|
|
||||||
field.constraints = {}
|
|
||||||
}
|
|
||||||
acc[fieldName] = expect.objectContaining({
|
acc[fieldName] = expect.objectContaining({
|
||||||
...field,
|
...field,
|
||||||
})
|
})
|
||||||
|
@ -441,7 +435,7 @@ describe("/datasources", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("info", () => {
|
describe("info", () => {
|
||||||
it("should fetch information about postgres datasource", async () => {
|
it("should fetch information about a datasource", async () => {
|
||||||
const table = await config.api.table.save(
|
const table = await config.api.table.save(
|
||||||
tableForDatasource(datasource, {
|
tableForDatasource(datasource, {
|
||||||
schema: {
|
schema: {
|
||||||
|
|
|
@ -400,7 +400,9 @@ class OracleIntegration extends Sql implements DatasourcePlus {
|
||||||
if (oracleConstraint.type === OracleContraintTypes.PRIMARY) {
|
if (oracleConstraint.type === OracleContraintTypes.PRIMARY) {
|
||||||
table.primary!.push(columnName)
|
table.primary!.push(columnName)
|
||||||
} else if (
|
} else if (
|
||||||
oracleConstraint.type === OracleContraintTypes.NOT_NULL_OR_CHECK
|
oracleConstraint.type ===
|
||||||
|
OracleContraintTypes.NOT_NULL_OR_CHECK &&
|
||||||
|
oracleConstraint.searchCondition?.endsWith("IS NOT NULL")
|
||||||
) {
|
) {
|
||||||
table.schema[columnName].constraints = {
|
table.schema[columnName].constraints = {
|
||||||
presence: true,
|
presence: true,
|
||||||
|
|
Loading…
Reference in New Issue