Download the PHP package ylsideas/cockroachdb-laravel without Composer

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

CockroachDB Driver for Laravel

Latest Version on Packagist PHPUnit Tests Check & fix styling Total Downloads codecov Help Fund License PHP Version Require

A driver/grammar for Laravel that works with CockroachDB. While CockroachDB is compatible with Postgresql, this support is not 1 to 1 meaning you may run into issues, this driver hopes to resolve those problems as much as possible.

Laravel 9 through to Laravel 11 is supported and tested against CockroachDB 22 & 23.

Supporting Open Source

Peter Fox here, I just want to say this project has been my hardest yet. It's been a real labour of love to make and takes up a lot of time trying to organise the test suite so that compatibility is maintained between Eloquent and CockroachDB.

I see a lot of promise in using CockroachDB's serverless offering which is what compelled me to go down this route originally. You can read an article I made about using their service.

If you're using this project at all then do please consider sponsoring me as a way of encouraging more development.

Installation

You can install the package via composer:

You need to add the connection type to the database config:

You can also use URLs.

Usage

To enable set DB_CONNECTION=crdb in your .env.

Notes

CockroachDB should work inline with the feature set of Postgresql, with some exceptions. You can look at the features of each CockroachDB server in the CockroachDB Docs.

Deletes with Joins

CockroachDB does not support performing deletes using joins. If you wish to do something like this you will need to use a sub-query instead.

At current if you try to call the delete method of the Query builder together with a join then a YlsIdeas\CockroachDb\Exceptions\FeatureNotSupportedException exception will be thrown.

Fulltext Search

Eloquent and Postgresql support Fulltext search. CockroachDB does not support any full text search meaning the feature cannot be used when using this driver.

At current if you try to create a Fulltext index using the Schema builder or try to use the whereFulltext method of the Query builder a YlsIdeas\CockroachDb\Exceptions\FeatureNotSupportedException exception will be thrown.

Serverless Support

Cockroach Serverless requires you to provide a cluster with connection. Laravel doesn't provide this out of the box, so, it's being implemented as an extra cluster parameter in the database config. Just pass the cluster identification from CockroachDB Serverless.

Schema Dumps

You may use schema dumps. I'm not 100% sure the functionality is correct in line with other drivers. Please raise an issue if it isn't working as expect for you.

You may also use a URL in the following format.

Testing

The tests try to closely follow the same functionality of the grammar provided by Laravel by lifting the tests straight from laravel/framework. This does provide some complications. Namely, cockroachdb is designed to be distributed so primary keys do not occur in sequence.

Tests should also try to be compatible with not just the latest version of Laravel but across Laravel 8, 9 and 10, this requires some tests to be skipped.

You can run up a local cockroachDB test instance using Docker compose.

If you need to you may run the docker compose file with different cockroachdb versions

Then run the following PHP script to create a test database and user

Afterwards you can run the test suite.

To clean up, you only need stop docker composer.

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of cockroachdb-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.9.2
illuminate/contracts Version 11.*|10.*|9.*
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 ylsideas/cockroachdb-laravel contains the following files

Loading the files please wait ....