tami5/sql.nvim

github github
neovim-lua-development plugin
star 163
stars
alert-circle 9
open issues
users 4
subscribers
git-branch 9
forks
CREATED

2020-12-29

UPDATED

26 days ago

packer

require('packer').startup(function()
  use 'tami5/sql.nvim'
end)

paq

require "paq" { 
  'tami5/sql.nvim'
}

sqlite.lua 💫

SQLite/LuaJIT binding and a highly opinionated wrapper for storing, retrieving, caching, and persisting SQLite databases. sqlite.lua present new possibilities for plugin development and while it's primarily created for neovim, it support all luajit environments.

✨ Features:

  • Connect, reconnect, close sql db connections sqlite:open/sql:close
  • Evaluate any sqlite statement and return result if any sqlite:eval
  • Helper function over sqlite:eval to do all sort of operation.
  • High level API with sqlite.tbl for better experience.
  • lua tables deserialization/serialization (in helper functions and high level api)
  • 90% test coverage.
  • Up-to-date docs and changelog

🚧 Installation

Packer.nvim (Neovim)

use { "tami5/sqlite.lua" }

luarocks (LuaJIT)

luarocks install sqlite luv

Ensure you have sqlite3 installed locally. (if you are on mac it might be installed already)

Windows

Download precompiled and set let g:sqlite_clib_path = path/to/sqlite3.dll (note: /)

Linux

sudo pacman -S sqlite # Arch
sudo apt-get install sqlite3 libsqlite3-dev # Ubuntu

Nix (home-manager)

programs.neovim.plugins = [
    {
      plugin = pkgs.vimPlugins.sql-nvim;
      config = "let g:sqlite_clib_path = '${pkgs.sqlite.out}/lib/libsqlite3.so'";
    }
];

🔥 Powered by sqlite.lua