Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion declarations/mle-encode-base64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "MLE functions to work with base64 encoded data",
"types": "mle-encode-base64.d.ts",
"author": "Oracle",
"version": "23.9.0",
"version": "23.26.0",
"license": "UPL-1.0",
"homepage": "https://oracle-samples.github.io/mle-modules",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion declarations/mle-js-bindings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "MLE Bindings for Oracle Database DBMS_MLE",
"types": "mle-js-bindings.d.ts",
"author": "Oracle",
"version": "23.9.0",
"version": "23.26.0",
"license": "UPL-1.0",
"homepage": "https://oracle-samples.github.io/mle-modules",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion declarations/mle-js-encodings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "MLE text encoding API",
"types": "index.d.ts",
"author": "Oracle",
"version": "23.9.0",
"version": "23.26.0",
"license": "UPL-1.0",
"homepage": "https://oracle-samples.github.io/mle-modules",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion declarations/mle-js-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "MLE Fetch API polyfill",
"types": "index.d.ts",
"author": "Oracle",
"version": "23.9.0",
"version": "23.26.0",
"license": "UPL-1.0",
"homepage": "https://oracle-samples.github.io/mle-modules",
"repository": {
Expand Down
72 changes: 68 additions & 4 deletions declarations/mle-js-oracledb/api.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2019, 2024, Oracle and/or its affiliates.
Copyright (c) 2019, 2025, Oracle and/or its affiliates.

The Universal Permissive License (UPL), Version 1.0

Expand Down Expand Up @@ -201,7 +201,7 @@ export interface IExecuteManyOptions {
*/
export interface IMetaData {
/**
* The column name follows Oracles standard name-casing rules. It will commonly be uppercase
* The column name follows Oracle's standard name-casing rules. It will commonly be uppercase
* since most applications create tables using unquoted, case-insensitive names.
*/
name: string;
Expand Down Expand Up @@ -239,7 +239,7 @@ export interface IMetaData {
*/
nullable?: boolean;
/**
* Name of the database type, such as NUMBER or VARCHAR2.
* Name of the database type, such as "NUMBER" or "VARCHAR2".
*/
dbTypeName?: string;
/**
Expand All @@ -254,6 +254,17 @@ export interface IMetaData {
* @since Oracle 23.4
*/
vectorFormat?: number;
/**
* Indicates if the column is known to contain a sparse vector.
* @since Oracle 23.26.0
*/
isSparseVector?: boolean;
/**
* Indicates if the column is known to
* contain binary encoded OSON data.
* @since Oracle 23.26.0
*/
isOson?: boolean;
}
/**
* Interface for representing result sets as returned by {@link execute}().
Expand Down Expand Up @@ -650,7 +661,7 @@ export declare abstract class IDbObjectClass {
readonly elementTypeClass?: IDbObjectClass;
/**
* When dbObject.isCollection is true, this will have the name of the
* element type, such as VARCHAR2 or NUMBER.
* element type, such as "VARCHAR2" or "NUMBER".
*/
readonly elementTypeName?: string;
/**
Expand Down Expand Up @@ -1235,3 +1246,56 @@ export declare class Parameters {
*/
set fetchTypeHandler(value: FetchTypeHandler);
}
/**
* Interface for representing a SparseVectors construction arguments.
* @since Oracle 23.26.0
*/
export interface ISparseVectorConstructorArgs {
/**
* This property is a JavaScript array or a 32-bit unsigned integer
* (Uint32Array) TypedArray
* that specifies the indices (zero-based) of non-zero values in the vector.
*/
indices: number[] | Uint32Array;
/**
* This property is an integer that specifies the number of dimensions of
* the vector.
*/
numDimensions: number;
/**
* This property is a JavaScript array or TypedArray that specifies the non-
* zero values stored in the vector.
*/
values: number[] | Uint8Array | Float32Array | Float64Array;
}
/**
* Interface for representing a SparseVector Class stores information about a sparse vector.
* @since Oracle 23.26.0
*/
export declare abstract class ISparseVector {
/**
* This property is a JavaScript array or a 32-bit unsigned integer (Uint32Array) TypedArray
* that specifies the indices (zero-based) of non-zero values in the vector.
*/
indices: number[] | Uint32Array;
/**
* This property is an integer that specifies the number of dimensions of the vector.
*/
numDimensions: number;
/**
* This property is a JavaScript array or TypedArray that specifies the non-zero values stored in the vector.
*/
values: number[] | Uint8Array | Float32Array | Float64Array;
/**
* Constructs a SparseVector.
*/
constructor(input: Uint8Array | Float32Array | Float64Array | number[] | string | ISparseVectorConstructorArgs);
/**
* Converts a sparse vector to a dense vector and returns a TypedArray of 8-bit signed integers, 32-bit floating-point numbers,
* or 64-bit floating-point numbers depending on the storage format of the sparse vector column's
* non-zero values in Oracle Database.
*
* This method is best used with sparse vectors read from Oracle Database.
*/
abstract dense(): Uint8Array | Float32Array | Float64Array;
}
5 changes: 4 additions & 1 deletion declarations/mle-js-oracledb/mle-js-oracledb-common.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2017, 2024, Oracle and/or its affiliates.
Copyright (c) 2017, 2025, Oracle and/or its affiliates.

The Universal Permissive License (UPL), Version 1.0

Expand Down Expand Up @@ -37,6 +37,8 @@ SOFTWARE.
*/
import { Parameters, IConnection, IResultSet, OutFormatType, JsType, FetchTypeHandler } from './api';
import { ISodaCollection, ISodaDatabase, ISodaDocument, ISodaDocumentCursor, ISodaOperation } from './soda-api';
import { SparseVector } from 'mle-js-plsqltypes';
export { SparseVector } from 'mle-js-plsqltypes';
export declare class OracleDb {
#private;
OUT_FORMAT_ARRAY: number;
Expand Down Expand Up @@ -128,6 +130,7 @@ export declare class OracleDb {
OracleDb: typeof OracleDb;
Connection: typeof IConnection;
ResultSet: typeof IResultSet;
SparseVector: typeof SparseVector;
/**
* Construct a new OracleDb object for connecting and querying Oracle Database.
*
Expand Down
2 changes: 1 addition & 1 deletion declarations/mle-js-oracledb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "MLE SQL Driver",
"types": "index.d.ts",
"author": "Oracle",
"version": "23.9.0",
"version": "23.26.0",
"license": "UPL-1.0",
"homepage": "https://oracle-samples.github.io/mle-modules",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion declarations/mle-js-plsql-ffi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "MLE Foreign Function Interface (FFI): API for calling PL/SQL functionality directly",
"types": "index.d.ts",
"author": "Oracle",
"version": "23.9.0",
"version": "23.26.0",
"license": "UPL-1.0",
"homepage": "https://oracle-samples.github.io/mle-modules",
"repository": {
Expand Down
80 changes: 78 additions & 2 deletions declarations/mle-js-plsqltypes/mle-js-plsqltypes.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2019, 2024, Oracle and/or its affiliates.
/**

The Universal Permissive License (UPL), Version 1.0

Expand Down Expand Up @@ -35,7 +35,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/**
* Class which implements infix operators for Oracle Number
* arithmetics: +, -, /, *, etc.
*
Expand Down Expand Up @@ -1230,4 +1229,81 @@ export declare class IOracleDate {
export declare class JsonId extends Uint8Array {
toJSON(): string;
}
/**
* Interface for representing a SparseVectors construction arguments.
* @since Oracle 23.26.0
*/
export interface ISparseVectorConstructorArgs {
/**
* This property is a JavaScript array or a 32-bit unsigned integer
* (Uint32Array) TypedArray
* that specifies the indices (zero-based) of non-zero values in the vector.
*/
indices: number[] | Uint32Array;
/**
* This property is an integer that specifies the number of dimensions of
* the vector.
*/
numDimensions: number;
/**
* This property is a JavaScript array or TypedArray that specifies the non-
* zero values stored in the vector.
*/
values: number[] | Uint8Array | Float32Array | Float64Array;
}
/**
* Interface for representing a SparseVector Class stores information about a sparse vector.
* @since Oracle 23.26.0
*/
export declare abstract class ISparseVector {
/**
* This property is a JavaScript array or a 32-bit unsigned integer (Uint32Array) TypedArray
* that specifies the indices (zero-based) of non-zero values in the vector.
*/
indices: number[] | Uint32Array;
/**
* This property is an integer that specifies the number of dimensions of the vector.
*/
numDimensions: number;
/**
* This property is a JavaScript array or TypedArray that specifies the non-zero values stored in the vector.
*/
values: number[] | Uint8Array | Float32Array | Float64Array;
/**
* Constructs a SparseVector.
*/
constructor(input: Uint8Array | Float32Array | Float64Array | number[] | string | ISparseVectorConstructorArgs);
/**
* Converts a sparse vector to a dense vector and returns a TypedArray of 8-bit signed integers, 32-bit floating-point numbers,
* or 64-bit floating-point numbers depending on the storage format of the sparse vector column's
* non-zero values in Oracle Database.
*
* This method is best used with sparse vectors read from Oracle Database.
*/
abstract dense(): Uint8Array | Float32Array | Float64Array;
}
/**
* A SparseVector class stores information about a sparse vector.
* This class represents an object that accepts one of the following
* types in its constructor: typed array, JavaScript array, object, or string.
*/
export declare class SparseVector extends ISparseVector {
static MAX_UINT32: number;
constructor(input: Uint8Array | Float32Array | Float64Array | number[] | string | ISparseVectorConstructorArgs);
private _validDenseArray;
private static _validateLengths;
private _updateProperties;
private _fromObject;
private _convertToTypedArrays;
private _fromString;
private _fromDense;
static create(sparseValue: any): any;
toJSON(): {
numDimensions: number;
indices: number[] | Uint32Array;
values: number[] | Uint8Array | Float32Array | Float64Array;
};
private _createEmptyArray;
dense(): any;
}
export {};
2 changes: 1 addition & 1 deletion declarations/mle-js-plsqltypes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "MLE PL/SQL Types",
"types": "mle-js-plsqltypes.d.ts",
"author": "Oracle",
"version": "23.9.0",
"version": "23.26.0",
"license": "UPL-1.0",
"homepage": "https://oracle-samples.github.io/mle-modules",
"repository": {
Expand Down
5 changes: 0 additions & 5 deletions declarations/mle-js/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
Note that using this package is deprecated and that instead you should just install `@types/mle-js` like this:
```sh
npm install --saveDev "https://github.com/oracle-samples/mle-modules#main"
```

Please consult the installation instructions and documentation on https://oracle-samples.github.io/mle-modules.
Loading