image thumbnail

sqlite3

version 2.0 (62.2 KB) by Rik
Matlab and Octave interface to the SQLite engine.

325 Downloads

Updated 03 Jul 2020

From GitHub

View license on GitHub

This function is a wrapper for mex interfaces that were compiled for most operating systems, and for both Matlab and Octave. All Matlab releases from R14SP3 (v7.1) and later should work. Octave mex files can be compiled from the source, which is downloaded by this function itself.
Matlab releases older than R14SP3 on Windows (and R2011a on Ubuntu) will use a command line interface (CLI), which imposes several restrictions on syntax and may yield inconsistent results. If the SQL statement returns output, the raw output from the system call is sent as the second output argument to allow custom parsing.
Note that only the non-CLI Matlab implementations support char values outside of the 0-255 range. If you plan on using Octave or Matlab 6.5 you should make sure the input is valid. Input and output are not sanitized to reflect this, in case it does work as expected.

A use demo is included.

Sources:
The Matlab interface is actually mksqlite version 2.5, see SourceForge for the compiled binaries included: https://sourceforge.net/projects/mksqlite/files/mksqlite-2.5.zip/download
The Octave mex files included were compiled from the files listed in the help text. The files can be downloaded from https://github.com/rmartinjak/mex-sqlite3 http://sqlite.org/2018/sqlite-amalgamation-3230100.zip https://github.com/LuaDist/lsqlite3
The CLI (command line interface) is in the sqlite-tools-win32-x86-3230100.zip file on sqlite.org. For the precise URL of the capture to the Wayback Machine, see the get_CLI_handle sub-function.

Logo adapted from https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Applications-database.svg/500px-Applications-database.svg.png

Licence: CC by-nc-sa 4.0

Cite As

Rik (2021). sqlite3 (https://github.com/thrynae/sqlite3/releases/tag/2.0), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with R13SP1 and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.