MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | OPTIONAL |
| 2 | SYNOPSIS |
| 3 | #include <pgsql.h> |
| 4 | |
| 5 | int pg_query (string query) |
| 6 | int pg_query (string query, int flags) |
| 7 | |
| 8 | DESCRIPTION |
| 9 | Queue a new query <query> to the database connection on the current |
| 10 | object. Return the unique id of the query. The query result itself |
| 11 | will be passed as argument to the callback function. |
| 12 | |
| 13 | <flags> can be one of these values: |
| 14 | PG_RESULT_ARRAY: Pass the query result as array. |
| 15 | PG_RESULT_MAP: Pass the query result as mapping. |
| 16 | |
| 17 | The function is available only if the driver is compiled with |
| 18 | PostgreSQL support. In that case, __PGSQL__ is defined. |
| 19 | |
| 20 | The efun triggers a privilege violation ("pgsql", "pg_query"). |
| 21 | |
| 22 | HISTORY |
| 23 | Added in 3.3.445. |
| 24 | LDMud 3.3.640 added the privilege violation. |
| 25 | |
| 26 | SEE ALSO |
| 27 | pgsql(C), pg_connect(E), pg_conv_string(E), pg_pending(E), pg_close(E), |
| 28 | privilege_violation(M) |