All Projects → a-ma72 → mksqlite

a-ma72 / mksqlite

Licence: BSD-2-Clause License
A MATLAB Mex-DLL to access SQLite databases

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
matlab
3953 projects

Projects that are alternatives of or similar to mksqlite

Jsonify
♨️A delightful JSON parsing framework.
Stars: ✭ 42 (+68%)
Mutual labels:  macosx
PokeChat
UNIX compatible, Discord and Telegram inspired, Pokémon-themed instant messaging service.
Stars: ✭ 11 (-56%)
Mutual labels:  sqlite3
lighthouse
Easy clojure relational database queries, migrations and connection pooling
Stars: ✭ 19 (-24%)
Mutual labels:  sqlite3
rsqlite3
sqlite3 Rewritten in RiiR Rust 🦀🦀🦀
Stars: ✭ 137 (+448%)
Mutual labels:  sqlite3
python-sqlite3-backup
Sqlite3 online API CPython implementation module
Stars: ✭ 44 (+76%)
Mutual labels:  sqlite3
sqlite zstd vfs
SQLite3 extension for read/write storage compression with Zstandard
Stars: ✭ 42 (+68%)
Mutual labels:  sqlite3
database
Advanced Database Access Service for Moleculer microservices framework
Stars: ✭ 22 (-12%)
Mutual labels:  database-access
mark
mark is an markdown editor app for mac
Stars: ✭ 47 (+88%)
Mutual labels:  macosx
selekt
A Kotlin and Android wrapper over SQLCipher, providing 256-bit AES encryption of database files.
Stars: ✭ 26 (+4%)
Mutual labels:  sqlite3
async-postgres
A runtime-independent asynchronus PostgreSQL client
Stars: ✭ 28 (+12%)
Mutual labels:  database-access
litelib
A cool little wrapper in Entity Framework style for SQLite based on Dapper
Stars: ✭ 63 (+152%)
Mutual labels:  sqlite3
RepostCheckerBot
Bot for checking reposts on reddit
Stars: ✭ 36 (+44%)
Mutual labels:  sqlite3
cmu15-445
💾 CMU 15-445/645: Intro to Database Systems (Fall 2017). A course on the design and implementation of database management systems.
Stars: ✭ 115 (+360%)
Mutual labels:  sqlite3
subtitles-view
基于javaFX的简单字幕处理桌面程序,集成在线翻译及语音转换
Stars: ✭ 368 (+1372%)
Mutual labels:  sqlite3
Sculpt-Comfort-Mission-Control
Switch desktops on your Mac with any mouse
Stars: ✭ 117 (+368%)
Mutual labels:  macosx
flaskbooks
A very light social network & RESTful API for sharing books using flask!
Stars: ✭ 19 (-24%)
Mutual labels:  sqlite3
sqlite
Golang library to build sqlite extensions
Stars: ✭ 36 (+44%)
Mutual labels:  sqlite3
PyQt4 locadora
PyQt4 - Locadora de Veículos
Stars: ✭ 24 (-4%)
Mutual labels:  sqlite3
ahobsu-node-backend
🌈 MOTI ! Make Own True Identity ⭐️ 유니큐와 유초코파이 노드로 탈주하다😎
Stars: ✭ 16 (-36%)
Mutual labels:  sqlite3
sic
link aggregator community organised by tags (with no javascript)
Stars: ✭ 82 (+228%)
Mutual labels:  sqlite3

mksqlite documentation

mksqlite is an open source project to implement an interface between MATLAB(R) and SQLite. You can use the command mksqlite to benefit from all features of SQLite.

Simply enter the command mksqlite('SELECT * FROM database') and you get an array of structures with the results of the query.

For a more detailed documentation visit the project home page: http://mksqlite.sourceforge.net.

Why using mksqlite?

Since MATLAB(R) version 2016a the is a sqlite(...) function for easy access to SQLite databases.
mksqlite on the other hand serves the facility to...

  • Handle BLOB data type (uint8 array)
  • Save numerical arrays as (compressed) BLOB (shadowed)
  • Save complex data structures (struct, cell, ...) as BLOB (shadowed)
  • Define your own SQLite functions in terms of MATLAB(R) function callbacks Additionally mksqlite has some nice features like for example bulk insertion and named parameter binding:
clear s
s(1).Name = 'Triangle';
s(1).Type = 'Shape';
s(1).ID   = 145;
s(2).Name = 'Rectangle';
s(2).Type = 'Shape';
s(2).ID   = 344;

mksqlite( 'BEGIN' );
mksqlite( 'INSERT INTO tbl (ID, Type, name) VALUES (:ID, :Type; :Name)', s );
mksqlite( 'COMMIT' );

Prerequisites

mksqlite is build on top of SQLite and tested on various MATLAB(R) versions (R13SP1, R14SP2, 2006a, 2008b, 2009a, 2010a..2018b). You can use mksqlite on Windows, Linux and MAC OS-X systems.
The precompiled windows binaries are available from https://sourceforge.net/projects/mksqlite/files.
Unzip the contents of the ZIP file into a directory and insert this directory to the MATLAB search path.

addpath('path-to-mksqlite');

You can create other versions of mksqlite via the source package.

Using mksqlite source code

You can find the sourcecode of mksqlite also at https://sourceforge.net/projects/mksqlite/files. The Microsoft Visual C++ Compiler version 2003, 2005, 2010..2017 is needed to compile mksqlite on windows systems. Just use the MATLAB(R) script "buildit.m" to compile them to a MEX-DLL.

Online help

There is a small help available, just type help mksqlite in the MATLAB(R) command window.
For detailed description and lots of samples watch the compiled help file (.CHM) in the /doc folder.

Usage

You can use mksqlite like any other M-Script command:

dbid = mksqlite([dbid, ] SQLQuery [, Argument])

The parameter dbid is optional and is needed only if you want to use several data bases at the same time. If dbid was omitted, then the data base id 1 is used. Function calls:

mksqlite('open', 'databasefile' [,'ro'|'rw'|'rwc'] [,'single'|'multi'|'serial'])

or

dbid = mksqlite(0, 'open', 'databasefile' [,...])

Opens the database "databasefile". If there is no such database, then it will be created. If you use the dbid of an already opened database, than this db will be closed first. If you use the dbid 0, then the next free dbid will be used and returned by the function call.

mksqlite('close')

or

mksqlite(dbid, 'close')

or

mksqlite(0, 'close')

Closes the databasefile. If you use dbid 0, then all databases will be closed.

mksqlite('SQL-Query')

or

mksqlite(dbid, 'SQL-Query')

Executes the query and returns the results..

FAQ

My Windows MATLAB(R) doesn't find mksqlite.

Be sure that you have placed mksqlite.mex* inside the MATLAB(R) path or in the current directory.

MATLAB(R) shows "Attempt to execute SCRIPT mksqlite as a function"

It seems that you are using an older version of MATLAB(R). Try to rename the file "mksqlite.mexw32" to "mksqlite.dll" or build a new version of mksqlite from the source package.

Does mksqlite work on 64Bit MATLAB(R), on Solaris, Linux, OS-X, ...

Yes, there are 64Bit versions inside the binary package. (mksqlite.mexw64, mksqlite.mexa64)

How can I rebuild mksqlite?

You need MATLAB(R) and a compiler. The compiler must be useable to build MATLAB(R) MEX-extensions. You can use on of the Microsoft Compiler on Windows, or a GNU compiler on other Systems. You will find the MATLAB(R) script "buildit.m" inside the source package. Just start it from the MATLAB(R) prompt.

The SQLite database seems to be very slow. Can I speedup my operations?

SQLite uses a journal file for every write operation. This slows down any change on the database. Try to use transactions for a block of change operations or change the journal functions with SQLite pragma commands. You can find more informations inside of the SQLite documentation.

How can I catch mksqlite errors?

You can use the standard MATLAB(R) try ... catch functions.

What does mksqlite costs?

You can use mksqlite without any cost. But if you mean that this software is worth a donation, Just send me a mail with your offer.

I need a new functionality, what's about new functions?

If you have implemented a new function or have an idea how something can made better, just send me an email. Maybe I will implement this function or I can give you a hint how you can work with the current functionality.

Can I do something to help develop mksqlite?

Sure, documentation, translation, extensions, give me notes about errors, ... Or just give me a note how do you use mksqlite.

License

mksqlite is distributed under the BSD-2 license (see LICENSE file)

Contact

Andreas Martin, [email protected]
Martin Kortmann, [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].