Creates a new CollectionReference instance.
Database instance.
Path to the collection.
Optionalparent: DocumentReference<any>Parent document.
Creates a AggregateQuery with aggregate operation of type sum or average.
Object containing aggregate operations { totalPopulation: oracledb.AggregateField.sum('population') }
Returns a AggregateQuery instance.
Creates a AggregateQuery with aggregate operation as count.
Returns a AggregateQuery instance.
Returns the DocumentReference for the document in the collection for the path.
OptionaldocPath: stringCreates a vector similarity query for v2 queries.
Optionaloptions: { metric?: "COSINE" | "EUCLIDEAN" | "DOT"; threshold?: number; topK?: number }Executes the query and return the result in form of snapshot.
Checks whether this CollectionReference is equal to the provided one.
Returns true if both CollectionReference instances are the same.
Creates and returns a new query that applies a limit clause to the query. It returns the documents with a constraint on the number of documents to be returned. It returns the last matching documents.
The maximum number of items to return.
Returns a Query instance.
Attaches callback to be executed on QuerySnapshot events. This is related to real time listening where we are using long-polling by default.
( observer : { complete ?: ( ) => void ; error ?: ( error :
OracledbError ) => void ; next ?: ( snapshot : QuerySnapshot => void ) )
( onNext : ( snapshot : QuerySnapshot < T > ) => void , onError ? : ( error : OracledbError ) => void , onCompletion ? : ( ) => void )
Creates and returns a Query that when executed returns documents sorted by the given field. If not specified, it sorts the values in ascending order.
Field name to apply order by on.
OptionaldirStr: "desc" | "asc"Direction or order by "asc" or "desc".
Creates and returns a new query with the additional conditions to filter data. It applies a where clause to the query.
Field name.
Operator to be used with where. "==", ">=", "<=", "<", ">", "in", "not-in", "like", "!=" (supported operators)
Value to be used while applying operator.
Returns a Query instance.
Custom data converter, allowing to use user defined classes with database instance. When get is called on the query the results are returned after applying the converter. Passing null will remove the current converter.
Object with two functions "fromOracledb" and "toOracledb". fromOracledb will be used to convert the json objects to user defined classes and toOracledb will be used to convert from user defined classes to json objects.
Query instance with converter.
CollectionReference - Represents a reference to a collection.