Table of Contents
List of Tables
List of Examples
This is a module which provides SQLite support for OpenSIPS. It implements the DB API defined in OpenSIPS.
The following modules must be loaded before this module:
No dependencies on other OpenSIPS modules.
Also this module provides two ways of creating the query. One is to use sqlite3_bind_* functions after opensips creates the prepared statement query. The second one directly uses only sqlite3_snprintf function to print the values into the opensips created query. In theory, the second one should be faster and should allow you to make more queries to the database in the same time, so by default this one will be active. You can use the sqlite3_bind_* interface by simply uncommenting the SQLITE_BIND line the Makefile.
Since the library does not support a function to return the number of rows in a query, this number is obtained using "count(*)" query. If we use multiple processes there is the risk ,since "count(*)" query and the actual "select" query, the number of rows in the result query to have changed, so realloc will be needed if the number is bigger. Using alloc_limit parameter you can specify the number with which the number of allocated rows in the result is raised.
Default value is 10.
This parameter enables extension loading, similiar to ".load" functionality in sqlite3, extenions like sqlite3-pcre which enables REGEX function. In order to use this functionality you must specify the library path (.so file) and the entry point which represents the function to be called by the sqlite library (read more at sqlite load_extension official documentation), separated by ";" delimiter. The entry point paramter can miss, so you won't need to use the delimitier in this case.
By default, no extension is loaded.
Example 1.2. Set db_sqlite_alloc_limit
parameter
... modparam("db_sqlite", "load_extension", "/usr/lib/sqlite3/pcre.so") modparam("db_sqlite", "load_extension", "/usr/lib/sqlite3/pcre.so;sqlite3_extension_init") ...
Because it dependes on an external library, the sqlite module is not compiled and installed by default. You can use one of the next options.
- edit the "Makefile" and remove "db_sqlite" from "excluded_modules" list. Then follow the standard procedure to install OpenSIPS: "make all; make install".
- from command line use: 'make all include_modules="db_sqlite"; make install include_modules="db_sqlite"'.
Table 2.1. Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
Name | DevScore | Commits | Lines ++ | Lines -- | |
---|---|---|---|---|---|
1. | Ionut Ionita (@ionutrazvanionita) | 81 | 28 | 3744 | 1276 |
2. | Razvan Crainea (@razvancrainea) | 17 | 15 | 107 | 42 |
3. | Liviu Chircu (@liviuchircu) | 12 | 10 | 32 | 60 |
4. | Jarrod Baumann (@jarrodb) | 5 | 3 | 7 | 4 |
5. | Vlad Patrascu (@rvlad-patrascu) | 4 | 2 | 3 | 2 |
6. | Alexandra Titoc | 4 | 2 | 2 | 3 |
7. | Aron Podrigal (@ar45) | 3 | 1 | 10 | 1 |
8. | Daniel Fussia | 3 | 1 | 4 | 22 |
9. | Maksym Sobolyev (@sobomax) | 3 | 1 | 2 | 2 |
10. | Bogdan-Andrei Iancu (@bogdan-iancu) | 3 | 1 | 2 | 1 |
All remaining contributors: Eric Green, Peter Lemenkov (@lemenkov).
(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)
(2) including any documentation-related commits, excluding merge commits. Regarding imported patches/code, we do our best to count the work on behalf of the proper owner, as per the "fix_authors" and "mod_renames" arrays in opensips/doc/build-contrib.sh. If you identify any patches/commits which do not get properly attributed to you, please submit a pull request which extends "fix_authors" and/or "mod_renames".
(3) ignoring whitespace edits, renamed files and auto-generated files
Table 2.2. Most recently active contributors(1) to this module
Name | Commit Activity | |
---|---|---|
1. | Razvan Crainea (@razvancrainea) | Aug 2015 - Oct 2024 |
2. | Liviu Chircu (@liviuchircu) | May 2016 - Sep 2024 |
3. | Alexandra Titoc | Sep 2024 - Sep 2024 |
4. | Maksym Sobolyev (@sobomax) | Feb 2023 - Feb 2023 |
5. | Eric Green | Aug 2020 - Aug 2020 |
6. | Bogdan-Andrei Iancu (@bogdan-iancu) | Apr 2019 - Apr 2019 |
7. | Vlad Patrascu (@rvlad-patrascu) | May 2017 - Apr 2019 |
8. | Peter Lemenkov (@lemenkov) | Jun 2018 - Jun 2018 |
9. | Ionut Ionita (@ionutrazvanionita) | Apr 2015 - Feb 2017 |
10. | Daniel Fussia | Jun 2016 - Jun 2016 |
All remaining contributors: Jarrod Baumann (@jarrodb), Aron Podrigal (@ar45).
(1) including any documentation-related commits, excluding merge commits
Last edited by: Liviu Chircu (@liviuchircu), Peter Lemenkov (@lemenkov), Ionut Ionita (@ionutrazvanionita).
Documentation Copyrights:
Copyright © 2015 www.opensips-solutions.com