Skip to content

utils.TediousUtils

Christian d'Heureuse edited this page Nov 16, 2026 · 1 revision

tedious-plus / utils/TediousUtils

utils/TediousUtils

Types and utility functions for result set rows, metadata, value data types and SQL parameters.

Interfaces

Interface Description
JsValueDataTypes Maps the data type names (see JsValueDataType) to the corresponding TypeScript types.
RequestResult The result from executing an SQL request.
RowTypes Maps the row type names (see RowType) to the corresponding row types.
SqlParamDataType The SQL data type of a parameter.
SqlParamDef A complete SQL parameter definition, with name, value and data type.
SqlParamDefVariants This structure provides variants for specifying SQL parameters.
SqlParamValueAndDataType The value and the SQL data type of a parameter.

Type Aliases

Type Alias Description
ArrayRow A result set row as an array of column values.
ArrayRowMetadata The metadata of a result set row, with one array entry per column.
JsValue The TypeScript type for a data type name, e.g. JsValue<"string|null"> is string | null.
JsValueDataType The name of a JavaScript value data type. Used for the dataType option of ConnectionPlus.queryScalar().
MapRow A result set row as a Map from column names to column values.
ObjectRow A result set row as an object structure.
ObjectRowMetadata The metadata of a result set row, with one object property per column.
Row The row type for a row type name, e.g. Row<"ArrayRow"> is ArrayRow.
RowType The name of a row format. Used for the rowType option.
TediousArrayRow A result set row in the format provided by the row event of a Tedious Request.
TediousObjectRow A result set row in the format provided by the row event of a Tedious Request when config.options.useColumnNames is true.

Functions

Function Description
convertArrayRowToObjectRow Converts an ArrayRow into an ObjectRow.
convertTediousArrayRow Converts a TediousArrayRow into one of the other row types.
convertTediousArrayRowToMapRow Converts a TediousArrayRow into a MapRow.
convertTediousArrayRowToObjectRow Converts a TediousArrayRow into an ObjectRow.
deriveParamDataTypeFromValue Derives the SQL parameter data type from a JavaScript value.
genParamName Generates an automatic parameter name.
genParamNameList Returns a string with automatically generated parameter names in the form "@a,@b,@c,...".
testJsValueDataType Verifies whether a value matches a data type.

Clone this wiki locally