solve / database
Database engine
v2.0.19
2015-07-20 02:59 UTC
Requires
- php: >=5.3.0
- solve/datatools: *
- solve/fsservice: *
- solve/graphics: >=1.0.2
- solve/inflector: >=1.0.3
- solve/storage: >=1.0.2
- dev-master
- 2.0.x-dev
- v2.0.19
- v2.0.18
- v2.0.17
- v2.0.16
- v2.0.15
- v2.0.14
- v2.0.13
- v2.0.12
- v2.0.11
- v2.0.10
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0
- v1.0.29
- v1.0.28
- v1.0.27
- 1.0.26
- v1.0.25
- v1.0.24
- v1.0.23
- v1.0.22
- v1.0.21
- v1.0.20
- v1.0.19
- v1.0.18
- v1.0.17
- v1.0.16
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
This package is auto-updated.
Last update: 2024-11-27 00:15:48 UTC
README
Database component for Solve framework
Already done:
QC
MysqlDBAdaptor
DBOperator
ModelOperator
ModelStructure
Model
ModelCollection
ModelRelation
SlugAbility
TranslateAbility
FilesAbility (+thumbnails)
Validation
Need to be realized
SortAbility TimeTrackAbility TreeAbility HistoryAbility DynamicAbility
Paginator
Sample model structure
Brand:
table: brands columns: id: type: 'int(11) unsigned' auto_increment: true title: type: varchar(255) indexes: primary: columns: - id relations: products: { } # here we have autodetect for model, for relation type and related field names
Category:
table: categories columns: id: type: 'int(11) unsigned' auto_increment: true title: type: varchar(255) indexes: primary: columns: - id relations: products: { }
Product:
table: products columns: id: type: 'int(11) unsigned' auto_increment: true title: type: varchar(255) id_brand: type: 'int(11) unsigned' indexes: primary: columns: - id relations: brand: { } categories: { }
Simple Operations:
$product = Product::loadOne(1); $product->title = 'Macbook air'; $product->save(); $product = new Product(); $product->title = 'Macbook pro' $product->save(); $list = Product::loadList(QC::create()->where('id < :d', 3)); //$list->loadRelated('brand'); - optional echo $list->getFirst()->brand->id; $list->getFirst()->setRelatedBrand(1); // set related by id