databaseIdstring uuid required
engine'postgresql' | 'mysql' | 'mariadb' | 'redis' | 'mongodb' required
status'starting' | 'ready' | 'closed' | 'expired' | 'failed' required
starting: the console is connecting (the team's database tools may be starting, about a minute the first time); ready: statements run; closed/expired/failed: ended, open a new session
mode'read' | 'write' required
read (default): the database refuses changes; write: statements may change data (needs databases:write)
canWriteboolean required
the caller may switch this session to write mode
preparingboolean required
the team's database tools are starting; the console connects on its own once they run
serverVersionstring nullable required
errorstring nullable required
endReason'closed' | 'idle' | 'lifetime' | 'worker_lost' | 'failed' | 'replaced' | 'unavailable' | 'null' nullable required
statementsinteger required
statements run in this session
idleTimeoutSecondsinteger required
the session ends after this long without a statement
statementTimeoutSecondsinteger required
maxRowsinteger required
rows returned per result at most
lastActivityAtstring required
expiresAtstring required
the session ends at this time at the latest
endedAtstring nullable required