statement.get([namedParameters][, ...anonymousParameters])


  • namedParameters <Object> 用于绑定命名参数的可选对象。此对象的键用于配置映射。

    ¥namedParameters <Object> An optional object used to bind named parameters. The keys of this object are used to configure the mapping.

  • ...anonymousParameters <null> | <number> | <bigint> | <string> | <Buffer> | <TypedArray> | <DataView> 零个或多个值绑定到匿名参数。

    ¥...anonymousParameters <null> | <number> | <bigint> | <string> | <Buffer> | <TypedArray> | <DataView> Zero or more values to bind to anonymous parameters.

  • 返回:<Object> | <undefined> 执行准备好的语句返回的第一行对应的对象。对象的键和值对应于行的列名和值。如果数据库未返回任何行,则此方法将返回 undefined

    ¥Returns: <Object> | <undefined> 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.

此方法执行准备好的语句并返回第一个结果作为对象。如果准备好的语句没有返回任何结果,则此方法返回 undefined。使用 namedParametersanonymousParameters 中的值的准备好的语句 参数已绑定

¥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.