| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
sqlite_bignum is a cross-platform SQLite extension that provides support for working with 64-bit unsigned integers (big numbers) as text, including collation and conversion functions. This makes it possible to safely and efficiently store, compare, and convert 64-bit values within SQLite databases, especially in contexts where binary and standard integer types may not be suitable.
First, build the extension for your platform (see Building).
Then, you can load it in SQLite:
sql .load './sqlite_bignum.dll'
The extension registers a collation sequence that allows correct sorting of 64-bit unsigned integers stored as text.
-- Example usage:
CREATE TABLE data
(
value TEXT COLLATE U64TEXT
);
INSERT INTO data
VALUES ('18446744073709551615'),
('1'),
('42');
SELECT *
FROM data
ORDER BY value COLLATE u64text;
git clone <your-repo-url>
cd sqlite_bignumcmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config ReleaseThe shared library will be found in the build/ directory as:
cmake --build build --target testOr, if you want to run the tests directly:
ctest --test-dir buildYou can use this extension with any SQLite application that supports loading external extensions.
.load '<path-to-shared-library>'
SELECT u64_to_text(42), text_to_u64('18446744073709551615'), is_u64text('invalid_value');
MIT or your license of choice.
Contributions, bug reports, and suggestions are welcome!
| Back | FazBrowse Home | New Git URL |