1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/sqlite
2022-07-06 10:44:36 +03:00
..
orm.v orm: mysql fixes (#14772) 2022-06-16 20:19:49 +03:00
README.md sqlite: improve exec_none behaviour (#14955) 2022-07-06 10:44:36 +03:00
result_code.v sqlite: add enum result code (#12505) 2021-11-18 13:56:15 +02:00
sqlite_orm_test.v
sqlite_test.v
sqlite.v sqlite: improve exec_none behaviour (#14955) 2022-07-06 10:44:36 +03:00
stmt.v

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 issuing to sqlite the following pragma commands.

db.exec('pragma synchronous = off;')
db.exec('pragma journal_mode = MEMORY;')