System Functions

sys::get_version() Return the server version as a tuple.
sys::get_version_as_str() Return the server version as a string.
sys::get_current_database() Return the name of the current database as a string.

function

sys::get_version()

System - 图1

System - 图2

System - 图3

sys::get_version() -> tuple>

Return the server version as a tuple.

The major and minor elements contain the major and the minor components of the version; stage is an enumeration value containing one of 'dev', 'alpha', 'beta', 'rc' or 'final'; stage_no is the stage sequence number (e.g. 2 in an alpha 2 release); and local contains an arbitrary array of local version identifiers.


1. db>


1. select sys::get_version();


1. {(major := 1, minor := 0, stage := <sys::VersionStage>'alpha',
2. stage_no := 1, local := [])}

function

sys::get_version_as_str()

System - 图4

System - 图5

System - 图6

sys::get_version_as_str() -> str

Return the server version as a string.


1. db>


1. select sys::get_version_as_str();


1. {'1.0-alpha.1'}

function

sys::get_transaction_isolation()

System - 图7

System - 图8

System - 图9

sys::get_transaction_isolation() -> sys::TransactionIsolation

Return the isolation level of the current transaction.

Possible return values are given by sys::TransactionIsolation.


1. db>


1. select sys::get_transaction_isolation();


1. {sys::TransactionIsolation.Serializable}

function

sys::get_current_database()

System - 图10

System - 图11

System - 图12

sys::get_current_database() -> str

Return the name of the current database as a string.


1. db>


1. select sys::get_current_database();


1. {'my_database'}

type

TransactionIsolation

System - 图13

System - 图14

System - 图15

Enum indicating the possible transaction isolation modes.

This enum only accepts a value of Serializable.