Download the PHP package sumpygump/hazelplum without Composer

On this page you can find all versions of the php package sumpygump/hazelplum. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hazelplum

Hazelplum DB

This is a database adapter for a simple flat-file database that stores just strings. It is useful for small projects to store things in database-like tables where no proper database is available.

Installation

Use composer to install

Usage

Hazelplum stores its data in a file on the filesystem. The database defintion file (.dbd file) provides detail on what tables and columns are available (the schema), and the actual data lives in separate files for each table (.dtf files).

Creating a database definition file

To create a database, make a .dbd file in the desired data directory. The name of the dbd file is the name of the database. It should have the following format: (everywhere with double underscores should be thought of as a placeholder)

Each table and column definition should be on its own line in the file.

Each line starts with a three-letter code indicating what is being defined.

Here is an example dbd file (work.dbd) defining two tables, users and work_assignments

Using the library

Once we have a dbd file defined and in place, you can start using the Hazelplum library to create and access data.

First spin up a database connection object (Hazelplum class object), defining where the db files live and the name of the database to use.

Note there is no concept of a column type, everything is just stored as "text."

Inserting records

You can insert some data into your table using the insert method

The insert method has three parameters:

The wonky nature of specifying the list of columns is for legacy reasons.

Selecting records

You can select data from your database that has been previously inserted.

The select method has the following parameters:

Updating records

You can update records.

The update method has the following parameters:

It returns the number of affected rows.

Deleting records

You can delete records.

The delete method has the following parameters:

It returns the number of affected rows.

Why did you make this?

I made this back in 2006 when I needed to store simple configuration data for a website. There are so many other options available, like json files, csv, ini, toml, yaml, sqlite and any other number of ways to store data in a flat file. My goal was to make it 'kinda like a SQL database' but really light. I thought it would be neat to explore a format that uses the ASCII record separator (1E) and unit separator (1F) characters as the row delimiter and column delimiter. This means you can store spaces, new lines, commas, semicolons, pipes etc in your data and it will just work.


All versions of hazelplum with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sumpygump/hazelplum contains the following files

Loading the files please wait ....