Method __builtin.Sql.Connection()->typed_query()
- Method
typed_query
array
(mapping
(string
:mixed
)) typed_query(object
|string
q
,mixed
...extraargs
)- Description
Send an SQL query synchronously to the SQL-server and return the results in typed mode.
For the arguments, please see the query() function.
- Returns
Returns one of the following on success:
array
(mapping
(string
:mixed
))The result as an array of mappings indexed on the name of the columns. The values have the appropriate native pike types where they fit the SQL data types - see the class doc for details on typed mode.
zero
The value
0
(zero) if the query didn't return any result (eg INSERT or similar).- Note
Typed mode support varies per database and per datatype. SQL datatypes which the current database cannot return as a native Pike type, will be returned as (untyped) strings.
- Note
The default implementation calls big_typed_query() and converts its result.
- See also