Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add function: chdb() to return version (#25)
* add function: chdb() to return version This is an example of a C++ function that returns the current version of chDB as a string. The version number is defined using the CHDB_VERSION_STRING macro, which should be defined during the build process. The FunctionChdbVersion class is a subclass of FunctionConstantBase, which is a base class for functions that return a constant value. The FunctionChdbVersion constructor takes the CHDB_VERSION_STRING macro as an argument, which is passed to the FunctionConstantBase constructor to set the constant value of the function. The REGISTER_FUNCTION macro is used to register the FunctionChdbVersion function with the FunctionFactory. The REGISTER_FUNCTION macro should be conditionally compiled using an #if directive that checks whether the CHDB_VERSION_STRING macro is defined, to avoid registering the function if the version number is not available. * Update chdbVersion.cpp * Update chdbVersion.cpp * Update CMakeLists.txt * Update CMakeLists.txt
- Loading branch information