v/vlib/db/sqlite
2024-07-02 23:10:00 +03:00
..
orm.v time: update unix time acces, fix issues related to deviating unix times (#21293) 2024-04-17 00:33:37 +03:00
parent_child_test.v orm: fix subquery without where expr (#21598) 2024-06-04 13:22:06 +03:00
README.md db.sqlite: make functions return results, breaking change (#19093) 2023-08-10 05:39:32 +03:00
result_code.v fmt: align the custom values of the enum fields (#19331) 2023-09-12 14:44:38 +03:00
sqlite.c.v db.sqlite: fix exec_param_many bug (#21008) 2024-03-13 14:39:15 +02:00
sqlite_orm_test.v v,breaking: add ability to read enum, fn, interface and sumtype attributes in compile-time, change builtin StructAttribute to VAttribute (#21149) 2024-03-31 09:14:33 +03:00
sqlite_test.v db.sqlite: fix exec_param_many bug (#21008) 2024-03-13 14:39:15 +02:00
sqlite_vfs_lowlevel_test.v fmt: implement wrapping function's super long arguments (fix #15545, fix #21643) (#21782) 2024-07-02 23:10:00 +03:00
stmt.c.v pg: hande C calls, move to .c.v files (#19739) 2023-11-03 20:43:44 +02:00
vfs_lowlevel.c.v all: update attributes to use new syntax 2023-11-15 16:16:01 +11:00

Description

sqlite is a thin wrapper for the SQLite library, which in turn is "a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine."

Install SQLite Dependency

Before you can use this module, you must first have the SQLite development library installed on your system.

Fedora 31:

sudo dnf -y install sqlite-devel

Ubuntu 20.04:

sudo apt install -y libsqlite3-dev

Windows:

  • Download the source zip from SQLite Downloads
  • Create a new sqlite subfolder inside v/thirdparty
  • Extract the zip into that folder

Performance Tips

When performing a large amount of database calls (i.e. INSERTS), significant performance increase can be obtained by controlling the synchronization and journal modes.

For instance:

import db.sqlite

db := sqlite.connect('foo.db') or { panic(err) }
db.synchronization_mode(sqlite.SyncMode.off)!
db.journal_mode(sqlite.JournalMode.memory)!