Skip to content

CodiePP/pl_lmdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interfacing to LMDB from Prolog

building the package for SWI Prolog

LMDB is a very fast database which maps committed records into memory.

compilation

aclocal --force && autoheader --force && autoconf --force

then run

./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)

mkdir -p ${HOME}/lib/sbcl
cp src/lmdb.qlf ~/lib/sbcl/
cp pllmdb-* ~/lib/sbcl/pllmdb

add to the search path for SWI Prolog:

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:

swipl -l test/t3.pl -g test

this test reads them all back and verifies them:

swipl -l test/t4.pl -g test

About

Prolog interface to LMDB (Lightning Memory-mapped Database)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors