Download the PHP package a1comms/eloquent-datastore without Composer
On this page you can find all versions of the php package a1comms/eloquent-datastore. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download a1comms/eloquent-datastore
More information about a1comms/eloquent-datastore
Files in a1comms/eloquent-datastore
Package eloquent-datastore
Short Description A package for using Google Datastore as a database driver.
License MIT
Informations about the package eloquent-datastore
Laravel Eloquent for Google Datastore
A package for using Google Datastore as a database driver.
By using this package, you can use query builder
and eloquent
to access data from datastore.
Installation
This package requires Laravel 9.x & PHP 8.1 as a minimum.
You can install the package via composer:
If you are using Laravel Package Auto-Discovery, you don't need you to manually add the ServiceProvider.
Without auto-discovery:
If you don't use auto-discovery, add the below ServiceProvider to the $providers
array in config/app.php
file.
Roadmap
- [x] Read data using query builder.
- [x] Read data using Eloquent model.
- [x] Insert data using Eloquent model.
- [x] Update data using Eloquent model.
- [x] Delete data.
- [x] Keys only queries.
- [x] Auto-generated primary key.
- [x] Read multiple pages of data with Datastore cursors.
- [x] Batch update from Eloquent collection.
- [ ] Cursor Paginate.
- [x] Ancestor key relations.
- [x] Datastore Namespaces (Multi-Tenancy).
Usage
You need to add datastore
connection in config/database.php
file.
Access using Eloquent Model
You need to extend AffordableMobiles\EloquentDatastore\Eloquent\Model
class instead of Laravel's default Eloquent model class.
Example-
Access using Query Builder
Example-
It will return a collection.
Tested Builder Functions
- [x]
connection
- [x]
table
- [x]
from
- [x]
namespace
(Datastore Namespace: Multi Tenancy) - [x]
select
(for projection query) - [x]
kind
(same as table) - [x]
where
(Available: = , > , < , >= , <= ) - [x]
limit
/take
- [x]
skip
- [x]
orderBy
- [x]
distinct
- [x]
get
- [x]
pluck
- [x]
exists
- [x]
count
- [ ]
simplePaginate
- [ ]
paginate
(works same as simplePaginate) - [x]
first
- [x]
delete
- [x]
insert
- [x]
_upsert
(different and incompatible with defaultupsert
) - [x]
find
/lookup
- [x]
chunk
/chunkMap
/each
- [x]
lazy
/cursor
Contribution Guide
You can contribute by reporting bugs, fixing bugs, submitting and reviewing pull requests.
Go to issues section, and you can start working on an issue immediately.
License
The MIT License (MIT). Please see License File for more information.
All versions of eloquent-datastore with dependencies
ext-json Version *
illuminate/support Version ~12
illuminate/pagination Version ~12
illuminate/database Version ~12
illuminate/http Version ~12
google/cloud-datastore Version ^1.32.3
affordablemobiles/laravel-eloquent-query-cache Version ~12