Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codiepp/pl_lmdb
Prolog interface to LMDB (Lightning Memory-mapped Database)
https://github.com/codiepp/pl_lmdb
hacktoberfest lmdb prolog
Last synced: about 18 hours ago
JSON representation
Prolog interface to LMDB (Lightning Memory-mapped Database)
- Host: GitHub
- URL: https://github.com/codiepp/pl_lmdb
- Owner: CodiePP
- License: gpl-3.0
- Created: 2021-06-25T17:58:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-03T20:29:34.000Z (over 2 years ago)
- Last Synced: 2025-01-20T21:16:48.005Z (1 day ago)
- Topics: hacktoberfest, lmdb, prolog
- Language: C
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Interfacing to LMDB from Prolog
[![building the package for SWI Prolog](https://github.com/CodiePP/pl_lmdb/actions/workflows/compilation.yml/badge.svg?branch=main)](https://github.com/CodiePP/pl_lmdb/actions/workflows/compilation.yml)
[LMDB](http://www.lmdb.tech/doc/) is a very fast database which maps committed records into memory.
## compilation
```sh
aclocal --force && autoheader --force && autoconf --force
```
then run
```sh
./configure
```
then call `make swi` to compile for SWI Prolog, or `make gp` to compile for GNU Prolog.
A simple `make` will produce both.## installation (SWI Prolog)
```sh
mkdir -p ${HOME}/lib/sbcl
cp src/lmdb.qlf ~/lib/sbcl/
cp pllmdb-* ~/lib/sbcl/pllmdb
```add to the search path for SWI Prolog:
```sh
echo ":- assertz(file_search_path(sbcl,'${HOME}/lib/sbcl'))." >> ${HOME}/.config/swi-prolog/init.pl
```## tests
run `make check` to start all tests using SWI Prolog and GNU Prolog. Note the time to completion.
this test will populate a database with one million of records:
```sh
swipl -l test/t3.pl -g test
```this test reads them all back and verifies them:
```sh
swipl -l test/t4.pl -g test
```