This PR adds a simple chdb() function with no parameters that returns the current version of chDB as a string.
The version number is defined using the CHDB_VERSION macro, which should be defined during the build process.
The function is conditionally compiled using an #if directive that checks whether the CHDB_VERSION_STRING macro derived from CHDB_VERSION is defined, to avoid building and registering the function if the version number is not available.
Changelog category (leave one):
New Feature
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
add function chdb() returning the current build version
This PR adds a simple
chdb()
function with no parameters that returns the current version of chDB as a string. The version number is defined using theCHDB_VERSION
macro, which should be defined during the build process.The function is conditionally compiled using an
#if
directive that checks whether theCHDB_VERSION_STRING
macro derived fromCHDB_VERSION
is defined, to avoid building and registering the function if the version number is not available.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
add function
chdb()
returning the current build version