Method Sql.postgres()->big_query()
- Method big_query
int
|object
big_query(object
|string
q
,mapping
(string
|int
:mixed
)|void
bindings
)- Description
This is the only provided interface which allows you to query the database. If you wish to use the simpler "query" function, you need to use the Sql.Sql generic SQL-object.
It returns a postgres_result object (which conforms to the Sql.sql_result standard interface for accessing data). I recommend using Sql.Sql()->query() for simpler queries (because it is easier to handle, but stores all the result in memory), and big_query() for queries you expect to return huge amounts of data (it's harder to handle, but fetches results on demand).
- Note
This function can raise exceptions.
- See also