Giter Club home page Giter Club logo

sqlean's Introduction

All the Missing SQLite Functions

SQLite has few functions compared to other database management systems. SQLite authors see this as a feature rather than a problem, because SQLite has an extension mechanism in place.

There are a lot of SQLite extensions out there, but they are incomplete, inconsistent and scattered across the internet. sqlean brings them together, neatly packaged into domain modules, documented, tested, and built for Linux, Windows and macOS.

We do not try to gather all the existing extensions into one giant pile — that would not be very useful. The goal is to create a well-thought set of domain modules with a convenient API. A kind of standard library for SQLite.

To achieve it, we split extensions that are too broad, merge the ones that are too narrow, refactor, add missing features, test, document, and do a ton of other small things.

Main setOther extensionsDownloadingInstallationSister projectsStay tuned

Main set

These are the most popular functions. They are tested, documented and organized into the domain modules with clear API.

Think of them as the extended standard library for SQLite:

  • crypto: hashing, encoding and decoding data
  • define: user-defined functions and dynamic sql
  • fileio: read and write files
  • fuzzy: fuzzy string matching and phonetics
  • ipaddr: IP address manipulation
  • math: math functions
  • regexp: regular expressions
  • stats: math statistics
  • text: string functions
  • unicode: Unicode support
  • uuid: Universally Unique IDentifiers
  • vsv: CSV files as virtual tables

The single-file sqlean bundle contains all extensions from the main set.

Other extensions

The scope of this project is limited to extensions without external dependencies (other than the C standard library and SQLite itself).

There are a lot of useful extensions that do not quite fit the scope for various reasons. To learn more about them, visit the SQLite extension hub.

Downloading

There are precompiled binaries for every OS:

  • sqlean-win-x64.zip - for Windows
  • sqlean-linux-x86.zip - for Linux (x86 CPU)
  • sqlean-linux-arm64.zip - for Linux (ARM CPU)
  • sqlean-macos-x86.zip - for Intel-based macOS
  • sqlean-macos-arm64.zip - for Apple silicon (ARM-based) macOS

Binaries are 64-bit and require a 64-bit SQLite version. If you are using SQLite shell on Windows (sqlite.exe), its 64-bit version is available at https://github.com/nalgeon/sqlite.

Other extensions are available for download from sqlpkg.org.

Installation and usage

The easiest way to try out sqlean extensions is to use the pre-bundled shell. But you can also load them individually.

For example, using the SQLite command-line interface:

sqlite> .load ./sqlean
sqlite> select median(value) from generate_series(1, 99);

See How to Install an Extension for usage with IDE, Python, JavaScript, etc.

Building from source

Download the dependencies:

make prepare-dist
make download-sqlite
make download-external

Then build for your OS (choose one of the following):

make compile-linux
make compile-windows
make compile-macos

You'll find the compiled extensions in the dist folder.

Contributing

This project only accepts bug fixes and minor improvements. If you'd like to contribute a new extension, please submit it to the extension hub repo.

Sister projects

Projects related to sqlean:

  • sqlpkg.org: a catalog of all SQLite extensions, with search and manual downloads.
  • sqlime.org: an online SQLite playground for debugging and sharing SQL snippets.
  • sqlpkg: an automated packager manager for SQLite (like npm for JS or pip for Python).
  • sqlean.py: a drop-in replacement for the default sqlite3 module.
  • sqlean.js: browser-based SQLite with extensions.
  • shell: custom builds for sqlite and sqlean shells.

License

Copyright 2021-2024 Anton Zhiyanov, Contributors and Third-party Authors.

The software is available under the MIT License.

Stay tuned

Subscribe to stay on top of new features.

sqlean's People

Contributors

nalgeon avatar skeeto avatar aborruso avatar flaviomartins avatar drjasonharrison avatar oranav avatar phrrngtn avatar notpeter avatar interkosmos avatar raffaem avatar riyaz-ali avatar vincentbernat avatar sf8321 avatar 0x09 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.