Skip to main content

get_engine_edition

Function get_engine_edition 

Source
pub async fn get_engine_edition(
    client: &mut Client,
) -> Result<EngineEdition, SqlServerError>
Expand description

Returns the EngineEdition of the SQL Server instance the client is connected to.

tiberius does not surface the engine edition, so we query SERVERPROPERTY('EngineEdition'), which is returned as a sql_variant and cast to an integer.

See: https://learn.microsoft.com/en-us/sql/t-sql/functions/serverproperty-transact-sql?view=sql-server-ver17