Describes request.sql on db and returns the answer as JSON text:
{"kind":"ok","entry":{...}} the cache entry (see entry_to_json)
{"kind":"sql_error","error":{...}} the server refused the statement
{"kind":"error","message":"..."} anything else (the connection died, say)
"ok" and "sql_error" carry "stale_schema": {"name","file","line","column","message"} when a
migration failed and the statement was described against the schema before it. A failure with no
schema to fall back on is {"kind":"migration_error","migration":{...}} (see migration_error_answer).
- db: the connection to describe on.
- request: what to describe.
describe_answer :: (db: *Connection, request: Describe_Request) -> string
Describes request.sql on db and returns the answer as JSON text:
{"kind":"ok","entry":{...}} the cache entry (see entry_to_json)
{"kind":"sql_error","error":{...}} the server refused the statement
{"kind":"error","message":"..."} anything else (the connection died, say)
"ok" and "sql_error" carry "stale_schema": {"name","file","line","column","message"} when a
migration failed and the statement was described against the schema before it. A failure with no
schema to fall back on is {"kind":"migration_error","migration":{...}} (see migration_error_answer).
Parameters
- db: *Connection
- the connection to describe on.
- request: Describe_Request
- what to describe.
Returns
- string