Skip to content

kkharji/sqlite.lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sql.nvim 💫

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

⏲️ Status

Under heavy development. Low level API is stable for usage, however, top level API and new features are subject to change. Please wait for 0.1 relaese or watch the repo for changes.

✨ Features:

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

🚧 Installation

Add sql.nvim to your lua package.path, neovim /**/start/ or use your favorite vim package manager, and ensure you have sqlite3 installed locally. If you are using macos, then sqlite3 should be installed already, otherwise install using brew.

Windows

Download precompiled and set let g:sql_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:sql_clib_path = '${pkgs.sqlite.out}/lib/libsqlite3.so'";
    }
];