prorm API Reference
    Preparing search index...

    Class OracleDialect

    Oracle dialect class that implements the Dialect interface

    Implements

    Index
    connect disconnect getConnection isConnected queryStream query escape escapeId quoteIdentifier quoteTable getDatabaseVersion createSchema dropSchema showAllSchemas listSchemas createDatabaseSQL dropDatabaseSQL createTable dropTable createPartitionedTable createPartition attachPartition detachPartition dropPartition addPartition listPartitions modifyPartition createForeignDataWrapper dropForeignDataWrapper createForeignServer dropForeignServer createForeignTable createUserMapping dropUserMapping changeOwner addConstraint removeConstraint createSecurityPolicy dropSecurityPolicy createView dropView showViews createMaterializedView refreshMaterializedView dropMaterializedView showMaterializedViews hasMaterializedView createMaterializedViewLog dropMaterializedViewLog addColumn removeColumn changeColumn describeTable renameTable showTables getTableStatus getCreateTable hasPartition showConstraints showIndexes addIndex removeIndex createIndex dropIndex createConstraint dropConstraint startTransaction createSavepointSQL releaseSavepointSQL rollbackToSavepointSQL commitTransaction rollbackTransaction getDataTypeSql buildWhereClause buildOrderClause buildWindowFunction buildCTE buildConnectByQuery buildLimitOffset buildInsertQuery buildUpdateQuery buildDeleteQuery buildSelectQuery buildMergeQuery buildUpsertQuery buildIncrementQuery replaceReplacements createExtension dropExtension getExtensions hasExtension buildCreateServerQuery buildAlterServerQuery buildDropServerQuery buildCreateUserMappingQuery buildAlterUserMappingQuery buildDropUserMappingQuery buildCreateForeignTableQuery buildDropForeignTableQuery buildImportForeignSchemaQuery getServersQuery buildCreateUserQuery buildAlterUserQuery buildDropUserQuery getUsersQuery buildGrantQuery buildRevokeQuery buildShowGrantsQuery buildFlushPrivilegesQuery buildCreateRoleQuery buildDropRoleQuery buildGrantRoleQuery buildRevokeRoleQuery getRolesQuery createSequence dropSequence nextSequenceValue hasSequence listSequences createStoredProcedure dropStoredProcedure dropProcedure createProcedure executeStoredProcedure hasStoredProcedure createTrigger dropTrigger hasTrigger createPolicy dropPolicy enableRLS disableRLS hasPolicy commentTable commentColumn createPartialIndex createExpressionIndex createIdentityColumn createComputedColumn bulkInsert addForeignKey renameColumn createFulltextIndex createSpatialIndex stDistance stWithin stContains stIntersects stDWithin stAsText stGeomFromText buildJsonTable listAgg buildPivotQuery buildUnpivotQuery buildJsonValue buildJsonQuery buildJsonExists createPackage dropPackage buildFlashbackClause buildFlashbackQuery flashbackTable flashbackTableBeforeDrop createExternalTable buildContains buildScore
    name: "oracle" = 'oracle'

    The name of the dialect

    library: "oracledb" = 'oracledb'

    The database library or driver being used

    • Stream query results using a correct ROWNUM-windowed pagination query (see createOracleQueryStream() in src/dialects/query-stream-helper.ts) rather than this dialect's own buildLimitOffset(), whose bare WHERE ROWNUM <= n doesn't actually skip the first offset rows.

      Parameters

      • sql: string

        The SELECT statement to stream

      • Optionaloptions: StreamOptions

        Streaming options (batch size, backpressure watermark, model mapping)

      Returns Readable

    • Escape an identifier (Oracle uses double quotes, same as quoteIdentifier). Without the surrounding quotes, Oracle folds unquoted identifiers to uppercase, which breaks lookups for mixed-case table/column names created elsewhere via quoteIdentifier()/quoteTable().

      Parameters

      • identifier: unknown

      Returns string

    • Quote a table name with optional schema

      Parameters

      • tableName: string
      • Optionalschema: string

      Returns string

    • Create a schema.

      Oracle has a CREATE SCHEMA statement, but it only exists to bundle a batch of CREATE TABLE/CREATE VIEW/GRANT statements into one transaction (CREATE SCHEMA AUTHORIZATION x <stmt> <stmt> ...) - it does not, by itself, create a schema as a standalone object, and CREATE SCHEMA AUTHORIZATION x with no accompanying statements is not valid Oracle usage. In Oracle a schema is a user (every user owns exactly one schema, and objects are always created "in" a user's schema), so creating a schema really means creating a user. A random password is generated since CREATE USER requires one; callers that need a specific password (or other user attributes) should use the User Management API (buildCreateUserQuery/UserManager.createUser) directly instead.

      Parameters

      • schema: string

      Returns Promise<void>

    • Drop a schema.

      Since a schema in Oracle is a user, dropping a schema means dropping that user (DROP SCHEMA/DROP SCHEMA ... CASCADE are not Oracle statements at all). CASCADE is always applied so that the user's owned objects are dropped along with the user, matching the intent of "drop this schema and everything in it". When ifExists is requested, the statement is wrapped so that ORA-01918 ("user does not exist") is silently ignored (see wrapIgnoringOraErrors); Oracle's own DROP USER ... IF EXISTS syntax is 23c-only and would fail against the 19c/21c versions this dialect targets.

      Parameters

      Returns Promise<void>

    • Create database SQL (Oracle uses tablespaces)

      Parameters

      • options: { name: string; encoding?: string; tablespace?: string }

      Returns string

    • Create partitioned table (Oracle supports RANGE, LIST, HASH, and INTERVAL partitioning)

      Parameters

      • tableName: string
      • columns: Record<string, ColumnDefinition>
      • Optionaloptions: TableOptions & {
            partitionBy: {
                type: "range" | "list" | "hash" | "reference" | "interval";
                column?: string | string[];
                interval?: string;
                referenceConstraint?: string;
            };
            partitions?: {
                name: string;
                bound?: PartitionBound
                | PartitionListBound
                | PartitionHashBound;
                tablespace?: string;
                storageParameters?: Record<string, string | number>;
                compression?: boolean;
            }[];
            subpartitionBy?: {
                type: "range"
                | "list"
                | "hash";
                column: string | string[];
            };
            subpartitions?: {
                name: string;
                bound?: PartitionBound
                | PartitionListBound
                | PartitionHashBound;
                tablespace?: string;
            }[];
        }

      Returns Promise<void>

    • Create partition Supports subpartitions in Oracle

      Parameters

      • options: CreatePartitionOptions & {
            subpartitionBy?: {
                type: "range" | "list" | "hash";
                column: string | string[];
            };
            subpartitions?: {
                name: string;
                bound?: PartitionBound
                | PartitionListBound
                | PartitionHashBound;
                tablespace?: string;
            }[];
            tablespace?: string;
            compression?: boolean;
            storageParameters?: Record<string, string | number>;
        }

      Returns Promise<void>

    • "Attach" a partition (Oracle has no PostgreSQL-style ATTACH PARTITION statement). The real Oracle equivalent for bringing an existing standalone table's data into a partitioned table's partition is ALTER TABLE ... EXCHANGE PARTITION ... WITH TABLE ..., which swaps the data segment of the partition with that of the standalone table as a fast, DDL-only (no data movement) operation.

      options.exchangeTable names the standalone table whose data becomes the partition's data; it defaults to options.partitionName for backwards compatibility with callers that used the partition name and the exchange-table name interchangeably.

      Parameters

      • options: AttachPartitionOptions & {
            exchangeTable?: string;
            includingIndexes?: boolean;
            validation?: "WITH VALIDATION" | "WITHOUT VALIDATION";
        }

      Returns Promise<void>

    • "Detach" a partition (Oracle has no PostgreSQL-style DETACH PARTITION statement). The real Oracle equivalent for extracting a partition's data out into a standalone table is the same EXCHANGE PARTITION statement used by attachPartition - it symmetrically swaps segments, so "detaching" is exchanging the partition with an (often empty) standalone table, leaving that table holding the former partition's data.

      Parameters

      • options: DetachPartitionOptions & {
            parentTable: string;
            exchangeTable?: string;
            includingIndexes?: boolean;
        }

      Returns Promise<void>

    • Drop partition Enhanced with cascade option for Oracle

      Parameters

      • partitionName: string
      • Optionaloptions: { ifExists?: boolean; cascade?: boolean; updateIndexes?: boolean }

      Returns Promise<void>

    • Add a partition to an existing partitioned table (Oracle)

      Parameters

      • tableName: string

        Name of the partitioned table

      • partitionName: string

        Name for the new partition

      • partitionSpec: { values?: string; forValues?: string }

        Partition specification

      Returns Promise<void>

    • List partitions for a table with details

      Parameters

      • tableName: string

      Returns Promise<
          {
              partitionName: string;
              partitionPosition: number;
              highValue: string;
              partitionType: string;
              tablespaceName: string;
              compression: string;
              numRows: number;
          }[],
      >

    • Modify partition (move, compress)

      Parameters

      • tableName: string
      • partitionName: string
      • Optionaloptions: {
            move?: boolean;
            compress?: boolean;
            tablespace?: string;
            storageParameters?: Record<string, string | number>;
            updateIndexes?: boolean;
        }

      Returns Promise<void>

    • Create foreign data wrapper (stub) Oracle uses Data Guard instead of FDW

      Parameters

      • _fdwName: string
      • Optional_options: { handler?: string }

      Returns Promise<void>

    • Drop foreign data wrapper (stub) Oracle uses Data Guard instead of FDW

      Parameters

      • _fdwName: string
      • Optional_options: { ifExists?: boolean }

      Returns Promise<void>

    • Create foreign server (stub) Oracle uses Data Guard instead of FDW

      Parameters

      • _serverName: string
      • _fdwName: string
      • Optional_options: { options?: Record<string, string>; ifNotExists?: boolean }

      Returns Promise<void>

    • Drop foreign server (stub) Oracle uses Data Guard instead of FDW

      Parameters

      • _serverName: string
      • Optional_options: { ifExists?: boolean }

      Returns Promise<void>

    • Create foreign table (stub) Oracle uses Data Guard instead of FDW

      Parameters

      • _tableName: string
      • _columns: Record<string, any>
      • Optional_options: {
            serverName: string;
            schema?: string;
            options?: Record<string, string>;
            ifNotExists?: boolean;
        }

      Returns Promise<void>

    • Create user mapping (stub) Oracle uses Data Guard instead of FDW

      Parameters

      • _serverName: string
      • _userName: string
      • Optional_options: { options?: Record<string, string>; ifNotExists?: boolean }

      Returns Promise<void>

    • Drop user mapping (stub) Oracle uses Data Guard instead of FDW

      Parameters

      • _serverName: string
      • _userName: string
      • Optional_options: { ifExists?: boolean }

      Returns Promise<void>

    • Change owner of a table or view

      Parameters

      • _newOwner: string
      • _tableName: string

      Returns Promise<void>

    • Add a constraint to a table

      Parameters

      • _tableName: string
      • _options: {
            type: "UNIQUE" | "PRIMARY KEY" | "FOREIGN KEY" | "CHECK";
            fields: string[];
            name?: string;
            references?: { table: string; fields: string[] };
            check?: string;
        }

      Returns Promise<void>

    • Remove a constraint from a table

      Parameters

      • _tableName: string
      • _constraintName: string

      Returns Promise<void>

    • Create a security policy (MSSQL Row-Level Security)

      Parameters

      • _policyName: string
      • _tableName: string
      • Optional_options: { predicate?: string }

      Returns Promise<void>

    • Drop a security policy (MSSQL Row-Level Security)

      Parameters

      • _policyName: string
      • _tableName: string

      Returns Promise<void>

    • Refresh a materialized view Oracle supports: FAST, COMPLETE, FORCE

      • FAST: Incremental refresh using materialized view logs
      • COMPLETE: Full refresh (recreates the entire view)
      • FORCE: Tries FAST, falls back to COMPLETE if not possible

      Parameters

      Returns Promise<void>

    • Check if a materialized view exists

      Parameters

      • viewName: string

        Name of the materialized view

      • Optionalschema: string

        Optional schema name

      Returns Promise<boolean>

      True if the materialized view exists

    • Create a materialized view log on a master table.

      FAST (incremental) refresh - as used by refreshMaterializedView() - requires a materialized view log on every master table referenced by the materialized view; without one, DBMS_MVIEW.REFRESH(..., 'F') fails with ORA-23413. This creates that log.

      Oracle syntax:

      CREATE MATERIALIZED VIEW LOG ON table_name
      WITH [ROWID] [, PRIMARY KEY] [, SEQUENCE] [(col1, col2, ...)] [INCLUDING NEW VALUES]

      Parameters

      Returns Promise<void>

    • Drop a materialized view log from a master table. Oracle syntax: DROP MATERIALIZED VIEW LOG ON table_name (Oracle has no IF EXISTS variant for this statement.)

      Parameters

      Returns Promise<void>

    • Get table status (Oracle implementation)

      Parameters

      • OptionaltableName: string

      Returns Promise<Record<string, any>[]>

    • Get table create statement (Oracle implementation)

      Parameters

      • tableName: string

      Returns Promise<string>

    • Check if a table has partitions (Oracle implementation)

      Parameters

      • tableName: string

      Returns Promise<boolean>

    • Drop an index

      Parameters

      • tableName: string
      • indexName: string
      • Optional_options: { ifExists?: boolean; cascade?: boolean }

      Returns Promise<void>

    • Build ORDER BY clause.

      Every Order shape is handled explicitly. Previously this only ever called Object.keys()/Object.entries() on each item, which is correct for the { field: 'DESC' } map form but silently mis-reads every other one: a ['name', 'DESC'] tuple yielded its indices (ORDER BY "0" ASC) and a bare 'name DESC' string yielded its character indices — ordering by the wrong thing rather than failing.

      Parameters

      Returns string

    • Build an Oracle analytic/window function expression, e.g. ROW_NUMBER() OVER (PARTITION BY "dept" ORDER BY "salary" DESC).

      Parameters

      • options: OracleWindowFunctionOptions

      Returns string

    • Build a WITH ... AS (...) common table expression clause and prepend it to a main query. A CTE is made recursive simply by supplying unionQuery (Oracle has no RECURSIVE keyword - the self-reference inside the UNION ALL member is what makes it recursive).

      Parameters

      • ctes: OracleCTEOptions | OracleCTEOptions[]
      • mainQuery: string

      Returns { sql: string; values: any[] }

    • Build an Oracle hierarchical query using START WITH ... CONNECT BY PRIOR, the pre-recursive-CTE idiom Oracle has supported since 8i and still commonly used/expected in Oracle codebases.

      Parameters

      • options: OracleConnectByOptions

      Returns { sql: string; values: any[] }

    • Build LIMIT/OFFSET clause using ROWNUM

      Parameters

      • Optionallimit: string | number
      • Optionaloffset: string | number

      Returns string

    • Build a general-purpose Oracle MERGE INTO ... USING ... ON (...) statement. Supports composite (multi-column) match keys, conditional WHEN [NOT] MATCHED predicates, and WHEN MATCHED ... THEN DELETE.

      Parameters

      • options: OracleMergeOptions

      Returns { sql: string; values: any[] }

    • Build increment query

      Parameters

      • tableName: string
      • fields: string | string[] | Record<string, number>
      • where: WhereOptions
      • Optionaloptions: { by?: number }

      Returns { sql: string; values: any[] }

    • Replace placeholders in SQL

      Parameters

      • sql: string
      • Optionalreplacements: unknown[] | Record<string, unknown>

      Returns string

    • Create a PostgreSQL extension

      Parameters

      • _extensionName: string
      • Optional_options: any

      Returns Promise<void>

    • Drop a PostgreSQL extension

      Parameters

      • _extensionName: string
      • Optional_options: any

      Returns Promise<void>

    • Check if a PostgreSQL extension is installed

      Parameters

      • _extensionName: string

      Returns Promise<boolean>

      True if the extension is installed

    • Build a DROP USER statement for Oracle.

      Parameters

      • username: string
      • options: { ifExists?: boolean; cascade?: boolean } = {}

      Returns string

    • Build a SHOW GRANTS query for Oracle. Queries USER_TAB_PRIVS for object grants.

      Parameters

      • username: string
      • Optional_host: string

      Returns string

    • Build a DROP ROLE statement for Oracle.

      Parameters

      • roleName: string
      • options: { ifExists?: boolean } = {}

      Returns string

    • Build a GRANT ROLE statement for Oracle.

      Parameters

      • role: string
      • to: string | string[]
      • options: { withAdminOption?: boolean } = {}

      Returns string

    • Build a REVOKE ROLE statement for Oracle.

      Parameters

      • role: string
      • from: string | string[]
      • _options: { cascade?: boolean } = {}

      Returns string

    • Drop a sequence.

      Like the other DDL paths in this dialect (tables, users, roles), Oracle's DROP SEQUENCE ... IF EXISTS syntax is 23c-only and raises ORA-00922 against the 19c/21c versions this dialect targets. When ifExists is requested, wrap the plain DDL so that ORA-02289 ("sequence does not exist") is silently ignored instead (see wrapIgnoringOraErrors).

      Parameters

      Returns Promise<void>

    • Parameters

      • sequenceName: string

      Returns Promise<number>

    • Parameters

      • sequenceName: string
      • Optionalschema: string

      Returns Promise<boolean>

    • List all sequences in the database (Oracle)

      Returns Promise<string[]>

      Array of sequence names

    • Parameters

      • triggerName: string
      • tableName: string
      • Optionalschema: string

      Returns Promise<boolean>

    • Enable Row-Level Security on a table

      Parameters

      • tableName: string
      • Optionalschema: string

      Returns Promise<void>

    • Disable Row-Level Security on a table

      Parameters

      • tableName: string
      • Optionalschema: string

      Returns Promise<void>

    • Check if a policy exists

      Parameters

      • policyName: string
      • tableName: string

      Returns Promise<boolean>

    • Add comment to a table

      Parameters

      • tableName: string
      • comment: string

      Returns Promise<void>

    • Add comment to a column

      Parameters

      • tableName: string
      • columnName: string
      • comment: string

      Returns Promise<void>

    • Partial indexes - not available on Oracle.

      Oracle's CREATE INDEX has no WHERE clause; the equivalent is a function-based index on a CASE expression that yields NULL for the rows to exclude, since a B-tree index does not store all-NULL keys.

      Parameters

      • _tableName: string
      • _indexName: string
      • _fields: string[]
      • _where: string
      • Optional_options: IndexOptions

      Returns Promise<void>

    • Create an expression index (functional index)

      Parameters

      • tableName: string
      • indexName: string
      • expression: string
      • Optionaloptions: IndexOptions

      Returns Promise<void>

    • Create an identity column (auto-increment)

      Parameters

      • tableName: string
      • columnName: string
      • Optionaloptions: {
            startWith?: number;
            incrementBy?: number;
            minvalue?: number;
            maxvalue?: number;
            cycle?: boolean;
        }

      Returns Promise<void>

    • Create a computed (virtual) column

      Parameters

      • tableName: string
      • columnName: string
      • expression: string
      • Optionaloptions: { persisted?: boolean; type?: string }

      Returns Promise<void>

    • Bulk insert records into a table

      Parameters

      • tableName: string
      • records: Record<string, any>[]
      • Optional_options: any

      Returns Promise<QueryResult>

    • Add a foreign key to a table

      Parameters

      • tableName: string
      • columnName: string
      • referencedTableName: string
      • referencedColumnName: string
      • Optionaloptions: {
            name?: string;
            onDelete?: "CASCADE" | "RESTRICT" | "SET NULL" | "NO ACTION";
            onUpdate?: "CASCADE" | "RESTRICT" | "SET NULL" | "NO ACTION";
        }

      Returns Promise<void>

    • Rename a column

      Parameters

      • tableName: string
      • oldColumnName: string
      • newColumnName: string

      Returns Promise<void>

    • Create a fulltext index (Oracle uses Oracle Text)

      Parameters

      • tableName: string
      • indexName: string
      • fields: string[]
      • Optionaloptions: { parser?: string; comment?: string }

      Returns Promise<void>

    • Create a spatial index (Oracle uses Spatial indexing)

      Parameters

      • tableName: string
      • indexName: string
      • fields: string[]
      • Optional_options: { srid?: number }

      Returns Promise<void>

    • ST_Distance - calculate distance between two geometries (Oracle)

      Parameters

      • geom1: string
      • geom2: string
      • Optionalsrid: number

      Returns string

    • ST_Within - check if geometry A is within geometry B (Oracle)

      Parameters

      • geom1: string
      • geom2: string
      • Optionalsrid: number

      Returns string

    • ST_Contains - check if geometry A contains geometry B (Oracle)

      Parameters

      • geom1: string
      • geom2: string
      • Optionalsrid: number

      Returns string

    • ST_Intersects - check if geometries intersect (Oracle)

      Parameters

      • geom1: string
      • geom2: string
      • Optionalsrid: number

      Returns string

    • ST_DWithin - check if geometries are within a given distance (Oracle)

      Parameters

      • geom1: string
      • geom2: string
      • distance: number
      • Optionalsrid: number

      Returns string

    • ST_AsText - convert geometry to text representation (Oracle)

      Parameters

      • geom: string

      Returns string

    • ST_GeomFromText - create geometry from text (Oracle)

      Parameters

      • wkt: string
      • Optionalsrid: number

      Returns string

    • Build a JSON_TABLE expression to shred a JSON document/array into relational rows (Oracle 12c+). Useful to project a JSON array column into rows instead of a correlated subquery. Oracle: JSON_TABLE(expr, '$[*]' COLUMNS(name type PATH '$.path', ...)) alias

      Parameters

      • jsonExpression: string
      • rowPath: string
      • columns: { name: string; type?: string; path?: string; forOrdinality?: boolean }[]
      • alias: string

      Returns string

    • Build a LISTAGG(expr, delimiter) WITHIN GROUP (ORDER BY ...) expression (Oracle 11gR2+), the standard idiom for collapsing grouped rows into a single delimited string.

      Parameters

      • expr: string
      • delimiter: string = ','
      • OptionalorderBy: Order
      • Optionaloverflow: string

      Returns string

    • Build an Oracle PIVOT query, rotating rows into columns (11g+).

      Parameters

      • options: OraclePivotOptions

      Returns string

    • Build an Oracle UNPIVOT query, rotating columns into rows (11g+).

      Parameters

      • options: OracleUnpivotOptions

      Returns string

    • Build a scalar JSON_VALUE(column, '$.path' RETURNING type) accessor (Oracle 12c+), the standard way to extract a scalar out of a JSON column.

      Parameters

      • column: string
      • path: string
      • Optionaloptions: { returning?: string; onError?: string }

      Returns string

    • Build a JSON_QUERY(column, '$.path') accessor (Oracle 12c+) for extracting a JSON object/array fragment (rather than a scalar) out of a JSON column.

      Parameters

      • column: string
      • path: string
      • Optionaloptions: { wrapper?: "WITH WRAPPER" | "WITHOUT WRAPPER" | "WITH CONDITIONAL WRAPPER" }

      Returns string

    • Build a JSON_EXISTS(column, '$.path') predicate (Oracle 12c+) for use in a WHERE clause to test for the presence of a JSON path.

      Parameters

      • column: string
      • path: string

      Returns string

    • Create an Oracle PL/SQL package specification and/or body. Emits CREATE [OR REPLACE] PACKAGE name AS <spec> END; and, when body is given, a following CREATE [OR REPLACE] PACKAGE BODY name AS <body> END;. At least one of spec/body must be provided.

      Parameters

      • options: OraclePackageOptions

      Returns Promise<void>

    • Drop an Oracle PL/SQL package. Pass bodyOnly to drop just the body and keep the specification.

      Parameters

      • packageName: string
      • Optionaloptions: { schema?: string; bodyOnly?: boolean }

      Returns Promise<void>

    • Build an Oracle flashback AS OF clause (AS OF TIMESTAMP ... or AS OF SCN ...) to append to a table reference for a point-in-time read. Returns an empty string when neither timestamp nor SCN is given.

      Parameters

      • options: OracleFlashbackOptions

      Returns string

    • Build a flashback SELECT: SELECT ... FROM table AS OF ... [WHERE ...], reading the table's rows as they existed at a past timestamp or SCN.

      Parameters

      • tableName: string
      • flashback: OracleFlashbackOptions
      • Optionaloptions: { schema?: string; attributes?: string[]; where?: WhereOptions }

      Returns { sql: string; values: any[] }

    • Flashback a table to a past point in time (FLASHBACK TABLE t TO TIMESTAMP/SCN ...). Requires row movement enabled on the table.

      Parameters

      • tableName: string
      • flashback: OracleFlashbackOptions

      Returns Promise<void>

    • Restore a dropped table from the recycle bin (FLASHBACK TABLE t TO BEFORE DROP [RENAME TO newName]).

      Parameters

      • tableName: string
      • OptionalrenameTo: string

      Returns Promise<void>

    • Create an Oracle external table (ORGANIZATION EXTERNAL) — the native Oracle mechanism for reading flat files / Data Pump dumps as a table, and the recommended replacement for the PostgreSQL-only foreign-table API that this dialect rejects.

      Parameters

      • tableName: string
      • options: OracleExternalTableOptions

      Returns Promise<void>

    • Build an Oracle Text CONTAINS(column, 'query') > 0 predicate for use in a WHERE clause against a CTXSYS.CONTEXT index (see createFulltextIndex). label ties the predicate to a SCORE(label) projection.

      Parameters

      • column: string
      • query: string
      • label: number = 1

      Returns string

    • Build an Oracle Text SCORE(label) projection expression that reports the relevance score computed by a matching CONTAINS(..., label) predicate.

      Parameters

      • label: number = 1

      Returns string