2017 © Pedro Peláez
 

library cdb

Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.

image

wikimedia/cdb

Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.

  • Saturday, July 28, 2018
  • by mediawiki
  • Repository
  • 17 Watchers
  • 9 Stars
  • 278,576 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 8 Versions
  • 5 % Grown

The README.md

![Latest Stable Version] ![License], (*1)

CDB functions for PHP

CDB, short for "constant database", refers to a very fast and highly reliable database system which uses a simple file with key value pairs. This library wraps the CDB functionality exposed in PHP via the dba_* functions. In cases where dba_* functions are not present or are not compiled with CDB support, a pure-PHP implementation is provided for falling back., (*2)

Additional documentation about the library can be found on mediawiki.org., (*3)

Usage

// Reading a CDB file
$cdb = Cdb\Reader::open( 'db.cdb' );
$foo = $cdb->get( 'somekey' );

// Writing to a CDB file
$cdb = Cdb\Writer::open( 'anotherdb.cdb' );
$cdb->set( 'somekey', $foo );
// Using the CLI
$ cdb ./myfile.cdb [get|list|match] <parameter>

Running tests

composer install --prefer-dist
composer test

History

This library was first introduced in MediaWiki 1.16 (r52203). It was split out of the MediaWiki codebase and published as an independent library during the MediaWiki 1.25 development cycle., (*4)


The Versions

28/07 2018

dev-master

9999999-dev https://www.mediawiki.org/wiki/CDB

Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.

  Sources   Download

GPL-2.0+ GPL-2.0-or-later

The Requires

  • php >=5.5.9

 

The Development Requires

by Daniel Kinzler
by Tim Starling
by Chad Horohoe
by Ori Livneh

29/05 2016

1.4.1

1.4.1.0 https://www.mediawiki.org/wiki/CDB

Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.3.2

 

The Development Requires

by Daniel Kinzler
by Tim Starling
by Chad Horohoe
by Ori Livneh

04/05 2016

1.4.0

1.4.0.0 https://www.mediawiki.org/wiki/CDB

Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by Daniel Kinzler
by Tim Starling
by Chad Horohoe
by Ori Livneh

08/09 2015

1.3.0

1.3.0.0 https://www.mediawiki.org/wiki/CDB

Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.3.2

 

The Development Requires

by Tim Starling
by Chad Horohoe
by Ori Livneh

08/09 2015

1.2.0

1.2.0.0 https://www.mediawiki.org/wiki/CDB

Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.3.2

 

The Development Requires

by Tim Starling
by Chad Horohoe
by Ori Livneh

10/08 2015

1.1.0

1.1.0.0 https://www.mediawiki.org/wiki/CDB

Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.3.2

 

The Development Requires

by Tim Starling
by Chad Horohoe

08/12 2014

1.0.1

1.0.1.0 https://www.mediawiki.org/wiki/CDB

Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.

  Sources   Download

GPL-2.0

The Requires

  • php >=5.3.2

 

The Development Requires

by Tim Starling
by Chad Horohoe

12/11 2014

1.0.0

1.0.0.0 https://www.mediawiki.org/wiki/CDB

Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.

  Sources   Download

GPLv2

The Requires

  • php >=5.3.2

 

The Development Requires

by Tim Starling
by Chad Horohoe