ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - mmzeeman/esqlite: Erlang NIF for sqlite
Erlang NIF for sqlite. Contribute to mmzeeman/esqlite development by creating an account on GitHub.
Visit Site

GitHub - mmzeeman/esqlite: Erlang NIF for sqlite

GitHub - mmzeeman/esqlite: Erlang NIF for sqlite

Esqlite Test

An Erlang nif library for sqlite3.

Introduction

This library allows you to use the excellent sqlite engine from erlang. The library is implemented as a nif library, which allows for the fastest access to a sqlite database. This can be risky, as a bug in the nif library or the sqlite database can crash the entire Erlang VM. If you do not want to take this risk, it is always possible to access the sqlite nif from a separate erlang node.

Special care has been taken not to block the normal erlang scheduler of the calling process. This is done by handling neccesary commands from erlang by using a dirty scheduler.

SQLite Compile Options

Esqlite contains an embedded version of sqlite3. Currently version 3.45.2 is embedded in the repositoy. It is also possible to use sqlite provided by the system by using the ESQLITE_USE_SYSTEM environment flag.

When sqlite is compiled, the following compile flags are used. These flags are recommended by sqlite.

SQLITE_DQS=0 SQLITE_THREADSAFE=1 SQLITE_DEFAULT_MEMSTATUS=0
SQLITE_DEFAULT_WAL_SYNCHRONOUS=1 SQLITE_LIKE_DOESNT_MATCH_BLOBS
SQLITE_MAX_EXPR_DEPTH=0 SQLITE_OMIT_DEPRECATED
SQLITE_OMIT_PROGRESS_CALLBACK SQLITE_USE_ALLOCA
SQLITE_OMIT_AUTOINIT SQLITE_USE_URI
SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS3_PARENTHESIS
SQLITE_ENABLE_FTS4
SQLITE_ENABLE_FTS5
SQLITE_ENABLE_MATH_FUNCTIONS
SQLITE_ENABLE_JSON1
SQLITE_ENABLE_RTREE
SQLITE_ENABLE_GEOPOLY

The use of flag SQLITE_DQS=0 is new in version 0.7. It can lead to incompatibilities with respect to the use of single and double qouted values. Historically sqlite didn't differentiate between double and single quoted values, but SQL does. In retrospect, the authors of sqlite, think this was a mistake, and introduced this compile flag to correct this mistake. It means that string literals must use single quotes:

INSERT INTO table VALUES('abcd', 1234);

When double quotes are used the value is seen as object values in SQL. So a query like:

INSERT INTO table VALUES("abcd", 1234);

Will not work, because it sees the value 'abcd' as a SQL object value, and not a string literal.

Version 0.8.0

This version is a major derivation from previous versions. When I started with this library it was implemented by using a separate os level thread per connection. At the time this was the only way to use functions in C which take longer to process than 1ms. A lot has changed since then. The VM now has dirty schedulers which make it possible to remove the thread per connection. This makes it possible to open a lot more connections. On the SQLite side some things have also changed. Extended error codes, introspection into the internals. This release modernizes the integration. In some places the API is no longer compatible and will require small changes. In order to ease this process the library now has typespecs, and the documentation was extended.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory