Download the PHP package midorikocak/nanodb without Composer

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

Nano DB

Latest Version on Packagist Build Status Coverage Status Quality Score Total Downloads

Nano DB is a tiny php library that allows you to define easily usable repositories.

There are 3 handy classes and 1 example in this library. Let's start with basics:

Requirements

Strictly requires PHP 7.4.

Install

Via Composer

Usage

Database

To use database library, simple inject it with pdo.

Alternatively, if you want to use a query object, you can inject it as well.

Operations are chained.

Select

If found, returns the data you need. If nothing found, empty array is returned.

Example output:

Order by

To order results use the orderBy($fieldName) method.

Offset and Limit

To limit and offset results use the limit($limit) and offset($offset) methods.

Insert

Insert using an array of data. Validation is your responsibility.

Update

Insert using an array of data. Again validation is your responsibility. If id does not exist, throws exception.

Delete

Returns affected rows. If id does not exist, throws exception.

RepositoryInterface

The repository interface is the interface of repositories.

If you want to use arrays to interact with your database, you can use the array repository.

Here $schema array is a simple optional array for Array validator, checked on every input with data. You can override it by extending ArrayValidator class.

Class Repositories

Let's say you have a simple user class.

You can create a Usersrepository, by implementing the RepositoryInterface.

Motivation and Warning

Mostly educational purposes. Please use at your own risk.

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

Contributing

Please see CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of nanodb with dependencies

PHP Build Version
Package Version
Requires php Version ~7.4
ext-json Version *
ext-pdo Version *
midorikocak/arraytools Version ^1.0.2
midorikocak/querymaker Version ^1.4.3
phpunit/php-token-stream Version ^4.0
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 midorikocak/nanodb contains the following files

Loading the files please wait ....