Skip to main content

get

method StatementSync.prototype.get
Jump to headingStatementSync.prototype.get(...anonymousParameters: SupportedValueType[]): unknown

This method executes a prepared statement and returns the first result as an object. If the prepared statement does not return any results, this method returns undefined. The prepared statement parameters are bound using the values in namedParameters and anonymousParameters.

Parameters Jump to heading

Jump to heading<span>...anonymousParameters</span>: SupportedValueType[]

Return Type Jump to heading

unknown

An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no rows were returned from the database then this method returns undefined.

Jump to headingStatementSync.prototype.get(
namedParameters: Record<string, SupportedValueType>,
...anonymousParameters: SupportedValueType[],
): unknown

Parameters Jump to heading

Jump to headingnamedParameters: Record<string, SupportedValueType>
Jump to heading<span>...anonymousParameters</span>: SupportedValueType[]

Return Type Jump to heading

unknown
Back to top