Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 17, 2018. It is now read-only.

Elixir NIF for sqlite

License

NotificationsYou must be signed in to change notification settings

elixir-sqlite/elixir_sqlite

 
 

Repository files navigation

CircleCICoverage StatusInline docsHex.pmHex.pm

Sqlite

Elixir API for interacting with SQLite databases.This library allows you to use the accelent sqlite engine fromerlang. The library is implemented as a nif library, which allows forthe fastest access to a sqlite database. This can be risky, as a bugin the nif library or the sqlite database can crash the entire ErlangVM. If you do not want to take this risk, it is always possible toaccess the sqlite nif from a separate erlang node.

Special care has been taken not to block the scheduler of the callingprocess. This is done by handling all commands from erlang within alightweight thread. The erlang scheduler will get control back whenthe command has been added to the command-queue of the thread.

Usage

{:ok,db}=Sqlite.open(":memory:")Sqlite.exec("create virtual table test_table using fts3(content text);",db):ok=Sqlite.exec("create table test_table(one varchar(10), two int);",db):ok=Sqlite.exec(["insert into test_table values(","\"hello1\"",",","10);"],db){:ok,1}=Sqlite.changes(db)

Tests

Since this project was originally an Erlang package, I chose to maintain theoriginal module name (as an alias) and it's tests to try to maintainbackwards compatibility. By default these tests get ran by default.

# All the tests without the bench marks.mixtest

Benchmarks

There is also a benchmark suite located in thebench directory.It does not get ran with the test suite since it can take quite a while.

# run all the tests and the benchmarks.mixtest --include bench

Thanks and License

This project is originally a fork ofesqliteWhich was originally an Erlang implementation. The underlying NIF code (inc_src),and the test file inerl_test both retain the original Apache v2 license.

About

Elixir NIF for sqlite

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir52.2%
  • C45.9%
  • Makefile1.3%
  • C++0.6%

[8]ページ先頭

©2009-2025 Movatter.jp