Is there a way to link dynamically to a specific sqlite library so that std/sqlite3 uses it instead of the system default?
I've tried countless variations of --passC:, --passL: etc but can't get nim to use the sqlite at /usr/local/opt/sqlite/lib/libsqlite3.dylib (the one brew installs on macOS). On a related matter, I successfully developed a sqlite extension in C but can't find the right incantation to translate it into nim (again, possibly because wrong headers/wrong library).
I'm new to nim and C so am probably missing something obvious about the build process.
I am writing down all the important things related to SQLite -
Actually, you probably already saw which version you were using when you connected to SQLite.
In any case, if you found this page, maybe you need another method to check your SQLite version.
Connecting to SQLite When you first connect to SQLite using a command line interface (such as Terminal on the Mac), the first thing you should see is the version number.
sqlite3 Result on my system:
SQLite version 3.28.0 2019-04-15 14:49:49 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. Perhaps slightly paradoxically, this obviously requires that you enter the major version number anyway. However, once connected, you then see the full version number.
Without Connecting You can also use the following command if you just want to check the version without actually connecting to SQLite.
sqlite3 --version The version_number() Function If you’re already connected to SQLite, you can find out which version it is with the version_number() function.
SELECT sqlite_version(); Result on my system:
3.28.0 Numbering System Starting from version 3.9.0, SQLite uses semantic versioning, which presents the major version number, followed by the minor version number, followed by the patch number.
Prior to version 3.9.0, SQLite employed a version identifier that contained between two and four numbers.
1. SQLite Version Numbers Beginning with version 3.9.0 (2015-10-14) SQLite uses semantic versioning. Prior to that time, SQLite employed a version identifier that contained between two and four numbers.
1.1. The New Version Numbering System (After 2015-10-14) All SQLite releases starting with 3.9.0 use a three-number "semantic version" of the form X.Y.Z. The first number X is only increased when there is a change that breaks backward compatibility. The current value for X is 3, and the SQLite developers plan to support the current SQLite database file format, SQL syntax, and C interface through at least the year 2050. Hence, one can expect that all future versions of SQLite for the next several decades will begin with "3.".
The second number Y is incremented for any change that breaks forward compatibility by adding new features. Most future SQLite releases are expected to increment the second number Y. The Z is reset to zero whenever Y is increased.
The third number Z is incremented for releases consisting of only small changes that implement performance enhancements and/or bug fixes.
The rate of enhancement for SQLite over the previous five years (2010-2015) is approximately 6 increments of Y per year. The numbering format used by for SQLITE_VERSION_NUMBER and sqlite3_libversion_number() allows versions up to 3.999.999, which is more than enough for the planned end-of-support date for SQLite in 2050. Basically I have used this version on hr selection and implementation(https://www.exactlly.com/blog/index.php/checklist-for-hr-selection-and-implementation/). However, the current tarball naming conventions only reserve two digits for the Y and so the naming format for downloads will need to be revised in about 2030.
1.2. The Historical Numbering System (Before 2015-10-14) This historical version numbering system used a two-, three-, or four-number version: W.X, W.X.Y, or W.X.Y.Z. W was the file format: 1 or 2 or 3. X was the major version. Y was the minor version. Z was used only for patch releases to fix bugs.
There have been three historical file formats for SQLite. SQLite 1.0 through 1.0.32 used the gdbm library as its storage engine. SQLite 2.0.0 through 2.8.17 used a custom b-tree storage engine that supported only text keys and data. All modern versions of SQLite (3.0.0 to present) use a b-tree storage engine that has full support for binary data and Unicode.
This major version number X was historically incremented only for large and important changes to the code. What constituted "large and important" was subjective. The 3.6.23 to 3.7.0 change was a result of adding support for WAL mode. The 3.7.17 to 3.8.0 change was a result of a rewrite known as the next generation query planner.
Hope you know related things from this content.
I am writing down all the important things related to SQLite -
Actually, you probably already saw which version you were using when you connected to SQLite.
In any case, if you found this page, maybe you need another method to check your SQLite version.
Connecting to SQLite When you first connect to SQLite using a command line interface (such as Terminal on the Mac), the first thing you should see is the version number.
sqlite3 Result on my system:
SQLite version 3.28.0 2019-04-15 14:49:49 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. Perhaps slightly paradoxically, this obviously requires that you enter the major version number anyway. However, once connected, you then see the full version number.
Without Connecting You can also use the following command if you just want to check the version without actually connecting to SQLite.
sqlite3 --version The version_number() Function If you’re already connected to SQLite, you can find out which version it is with the version_number() function.
SELECT sqlite_version(); Result on my system:
3.28.0 Numbering System Starting from version 3.9.0, SQLite uses semantic versioning, which presents the major version number, followed by the minor version number, followed by the patch number.
Prior to version 3.9.0, SQLite employed a version identifier that contained between two and four numbers.
1. SQLite Version Numbers Beginning with version 3.9.0 (2015-10-14) SQLite uses semantic versioning. Prior to that time, SQLite employed a version identifier that contained between two and four numbers.
1.1. The New Version Numbering System (After 2015-10-14) All SQLite releases starting with 3.9.0 use a three-number "semantic version" of the form X.Y.Z. The first number X is only increased when there is a change that breaks backward compatibility. The current value for X is 3, and the SQLite developers plan to support the current SQLite database file format, SQL syntax, and C interface through at least the year 2050. Hence, one can expect that all future versions of SQLite for the next several decades will begin with "3.".
The second number Y is incremented for any change that breaks forward compatibility by adding new features. Most future SQLite releases are expected to increment the second number Y. The Z is reset to zero whenever Y is increased.
The third number Z is incremented for releases consisting of only small changes that implement performance enhancements and/or bug fixes.
The rate of enhancement for SQLite over the previous five years (2010-2015) is approximately 6 increments of Y per year. The numbering format used by for SQLITE_VERSION_NUMBER and sqlite3_libversion_number() allows versions up to 3.999.999, which is more than enough for the planned end-of-support date for SQLite in 2050. Basically I have used this version on hr selection and implementation(https://www.exactlly.com/blog/index.php/checklist-for-hr-selection-and-implementation/). However, the current tarball naming conventions only reserve two digits for the Y and so the naming format for downloads will need to be revised in about 2030.
1.2. The Historical Numbering System (Before 2015-10-14) This historical version numbering system used a two-, three-, or four-number version: W.X, W.X.Y, or W.X.Y.Z. W was the file format: 1 or 2 or 3. X was the major version. Y was the minor version. Z was used only for patch releases to fix bugs.
There have been three historical file formats for SQLite. SQLite 1.0 through 1.0.32 used the gdbm library as its storage engine. SQLite 2.0.0 through 2.8.17 used a custom b-tree storage engine that supported only text keys and data. All modern versions of SQLite (3.0.0 to present) use a b-tree storage engine that has full support for binary data and Unicode.
This major version number X was historically incremented only for large and important changes to the code. What constituted "large and important" was subjective. The 3.6.23 to 3.7.0 change was a result of adding support for WAL mode. The 3.7.17 to 3.8.0 change was a result of a rewrite known as the next generation query planner.
Hope you know related things from this content.
I am writing down all the important things related to SQLite -
Actually, you probably already saw which version you were using when you connected to SQLite.
In any case, if you found this page, maybe you need another method to check your SQLite version.
Connecting to SQLite When you first connect to SQLite using a command line interface (such as Terminal on the Mac), the first thing you should see is the version number.
sqlite3 Result on my system:
SQLite version 3.28.0 2019-04-15 14:49:49 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. Perhaps slightly paradoxically, this obviously requires that you enter the major version number anyway. However, once connected, you then see the full version number.
Without Connecting You can also use the following command if you just want to check the version without actually connecting to SQLite.
sqlite3 --version The version_number() Function If you’re already connected to SQLite, you can find out which version it is with the version_number() function.
SELECT sqlite_version(); Result on my system:
3.28.0 Numbering System
Prior to version 3.9.0, SQLite employed a version identifier that contained between two and four numbers.
1. SQLite Version Numbers Beginning with version 3.9.0 (2015-10-14) SQLite uses semantic versioning. Prior to that time, SQLite employed a version identifier that contained between two and four numbers.
1.1. The New Version Numbering System (After 2015-10-14) All SQLite releases starting with 3.9.0 use a three-number "semantic version" of the form X.Y.Z. The first number X is only increased when there is a change that breaks backward compatibility. The current value for X is 3, and the SQLite developers plan to support the current SQLite database file format, SQL syntax, and C interface through at least the year 2050. Hence, one can expect that all future versions of SQLite for the next several decades will begin with "3.".
The third number Z is incremented for releases consisting of only small changes that implement performance enhancements and/or bug fixes.
The rate of enhancement for SQLite over the previous five years (2010-2015) is approximately 6 increments of Y per year. The numbering format used by for SQLITE_VERSION_NUMBER and sqlite3_libversion_number() allows versions up to 3.999.999, which is more than enough for the planned end-of-support date for SQLite in 2050. Basically I have used this version on hr selection and implementation(https://www.exactlly.com/blog/index.php/checklist-for-hr-selection-and-implementation/). However, the current tarball naming conventions only reserve two digits for the Y and so the naming format for downloads will need to be revised in about 2030.
1.2. The Historical Numbering System (Before 2015-10-14) This historical version numbering system used a two-, three-, or four-number version: W.X, W.X.Y, or W.X.Y.Z. W was the file format: 1 or 2 or 3. X was the major version. Y was the minor version. Z was used only for patch releases to fix bugs.
There have been three historical file formats for SQLite. SQLite 1.0 through 1.0.32 used the gdbm library as its storage engine. SQLite 2.0.0 through 2.8.17 used a custom b-tree storage engine that supported only text keys and data. All modern versions of SQLite (3.0.0 to present) use a b-tree storage engine that has full support for binary data and Unicode.
This major version number X was historically incremented only for large and important changes to the code. What constituted "large and important" was subjective. The 3.6.23 to 3.7.0 change was a result of adding support for WAL mode. The 3.7.17 to 3.8.0 change was a result of a rewrite known as the next generation query planner.
Hope you know related things from this content.