Download the PHP package sinevia/php-library-schemaless without Composer
On this page you can find all versions of the php package sinevia/php-library-schemaless. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sinevia/php-library-schemaless
More information about sinevia/php-library-schemaless
Files in sinevia/php-library-schemaless
Package php-library-schemaless
Short Description PHP Library Schemaless
License proprietary
Homepage http://github.com/sinevia/php-library-schemaless
Informations about the package php-library-schemaless
Schemaless
A streamlined entity-attribute (EA) implementation for PHP. This package is designed for quick plug and play "schemaless" prototyping. To achieve this the package uses only two database tables unlike the standard EAV (which uses at least three tables).
Install
Using composer
Create storage tables
Uninstall
Delete storage tables
How to Use?
-
Creating new entities
-
Set attributes
-
Get entities
-
Get attributes
-
Update entity
-
Update attribute
-
Delete entity
- Delete attribute
Table Schema
The following schema is used for the database.
Entity | |
---|---|
Id | String, UniqueId |
Status | String |
Type | String |
ParentId | String, UniqueId |
Sequence | Integer |
Name | String |
CreatedAt | DateTime |
DeletedAt | DateTime |
Udated At | DateTime |
Attribute | |
---|---|
Id | String, UniqueId |
EntityId | String, UniqueId |
Key | String |
Value | JSON Text (Long) |
CreatedAt | DateTime |
DeletedAt | DateTime |
UpdatedAt | DateTime |
Extend
One can easily extend the default schemaless class, and create his own version. See the example below which custome table names.
Working with Objects
Schemaless provides options to work with Objects instead of with Entities and Attributes. This is achieved with two helper classes - SchemalessDataObject and SchemalessDataObjectRepository.
Note that being an abstraction it will be a bit slower as it will have to hydrate the data objects with data.