Download the PHP package jamielsharief/document-store without Composer

On this page you can find all versions of the php package jamielsharief/document-store. 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 document-store

DocumentStore

license build coverage

DocumentStore is a Key-Value Store (KVS) that stores data in JSON documents, giving you a productive way to work with simple or nested data and allows for felxible and dynamic schema. Data can easily be synced across multiple servers. This provides a consistent interface for working with JSON data as a no SQL database.

Creating a Document

Create a Document and add any data you like, it can be nested include arrays

You can also create a Document from an array

The Document object can also be accessed as an array

Set

To add a Document to the DocumentStore

You can also group Documents using a prefixes (as many levels) which organizes the Documents into folders.

Get

To get a Document from the DocumentStore

To get a Document with a prefix

Has

To check a Document exists

To check a Document with a prefix

Delete

To delete a Document from the DocumentStore

To delete a Document with a prefix

List

To list Documents in the DocumentStore

Document

Key

If you are working a Document that was stored in the DocumentStore, you can use the key method to get the key that was used. This is handy for when working with search results from find first or find all.

To Array

To convert the Document into an array

To Json

To convert the Document into a JSON string

Searching

You can also search Documents in the DocumentStore, this is a file based searched . So if you have 100,000s of Documents in a prefix or regularly perform large amounts of searches and speed is an issue, maybe an indexing software like Elasticsearch or Solr might be worth looking at.

Keys

To get a list a keys that match a set of conditions (see below). There are also finders, which are detailed after conditions.

The following options can be passed

Fields

You can search different fields using the dot notation, and you can searched nested data as well.

Lets say you have this data

Here are some examples how to search the the different levels of fields;

Conditions

Here are some examples on the different search conditions

Equals

You can check single or multiple values (IN)

Not Equals

You can check single or multiple values (NOT IN)

Arithmetic

To check field values, such as greater, less than etc.

Like

You can use SQL LIKE and NOT LIKES using the wildcard % for any chars or _ for just one character, this is a case insensitive search.

Finders

You can use the key method on any document found using first or all to find what key was used to save that Document.

First

To find the first Document that matches a set of conditions

All

To find all Documents that match a set of conditions

Count

If you only want the count then use this but if you want the count and records, count the results manually from search or the all finder, to prevent repetitive and pointless searching on the hard drive.

To find a count Documents that match a set of conditions

Document Database

There is a DocumentDatabase adapter which uses the DocumentStore as the backend, but makes it work similar to a database, such as generating keys, saving multiple records etc.

Insert

Insert first generates a unique ID, adds an _id field to the Document, then adds this to the DocumentStore using the ID as the key.

You can also insert into a particular path

There is also an insertMany method

Update

When you are working with Documents that have already been saved in the DocumentDatabase, and have an _id field you can save any changes using the update method.

There is also an updateMany method


All versions of document-store with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
phpunit/phpunit Version ^9.2
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 jamielsharief/document-store contains the following files

Loading the files please wait ....