@samveys/oracle
Oracle Database driver (node-oracledb thin mode)
import { oracle, oracleColumnSql, ORACLE_SESSION_FORMATS, oracleDialect, oracleDriver } from '@samveys/oracle'
Function (2)
oracle
Function
An Oracle connection config: `oracle({ host: '127.0.0.1', serviceName: 'FREEPDB1', user: 'app', password })`.
function oracle(options: OracleOptions): ConnectionConfig<OracleOptions>;
Exported from packages/oracle/src/index.ts
oracleColumnSql
Function
Oracle type for a schema-builder column.
function oracleColumnSql(column: ColumnDefinition): string;
Exported from packages/oracle/src/dialect.ts
Value (3)
ORACLE_SESSION_FORMATS
Value
Session formats the driver sets on every connection (`alter session`), so Temporal text binds convert implicitly and date/time columns fetched as text parse back without loss.
const ORACLE_SESSION_FORMATS: {
readonly NLS_DATE_FORMAT: 'YYYY-MM-DD';
readonly NLS_TIMESTAMP_FORMAT: 'YYYY-MM-DD"T"HH24:MI:SS.FF6';
readonly NLS_TIMESTAMP_TZ_FORMAT: 'YYYY-MM-DD"T"HH24:MI:SS.FF6TZH:TZM';
};
Exported from packages/oracle/src/dialect.ts
oracleDialect
Value
The Oracle dialect. Identifiers are quoted and folded to upper case (`"USERS"`), which is the name an unquoted identifier gets, so raw DDL and builder SQL agree; the driver folds upper-case result labels back to lower case. Pagination is `OFFSET … ROWS FETCH NEXT … ROWS ONLY` (12c+); derived tables take no `as` (ADR 0014).
const oracleDialect: Dialect;
Exported from packages/oracle/src/dialect.ts
oracleDriver
Value
No documentation comment.
const oracleDriver: DatabaseDriver<OracleOptions>;
Exported from packages/oracle/src/index.ts
Interface (1)
OracleOptions
Interface
No documentation comment.
interface OracleOptions {
readonly host: string;
readonly port?: number;
/** Service name, e.g. `FREEPDB1`. */
readonly serviceName: string;
readonly user: string;
readonly password: string;
readonly pool?: {
readonly max?: number;
};
}
Exported from packages/oracle/src/index.ts