Download the PHP package serebro/reach-mongo without Composer
On this page you can find all versions of the php package serebro/reach-mongo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package reach-mongo
Reach - PHP MongoDB ODM
Requirements
- PHP >= 5.4;
- ext-mongo >= 1.5
The key feature list:
- Simple, Powerful, Ultrafast
- Support of schema-less documents
- Ability to use efficient result set iterator instead of raw arrays of results
- Lazy loading/creating of documents
- Support for partial loading of documents from DB
- Unit of work (Reduce the number of database requests/updates. Prevent redundant requests and multiple updates to the same document)
- References and embeds
- Events (system:
before*()
,after*()
; custom:on()
,off()
,trigger()
) - Query builder
- Extensions: Reach can be customized infinitely with behaviours.
- Creating an auto-incrementing sequence field
- Batch inserting, Pagination, Logging
- Integration with IDEs
Installation
Basic usage
Create your model
Query Builder
Criteria methods
add()
- Joins query clauses with a logical AND returns all documents that match the conditions of both clauses.addOr()
- Joins query clauses with a logical OR returns all documents that match the conditions of either clause.addNor()
- Joins query clauses with a logical NOR returns all documents that fail to match both clauses.where()
- Matches documents that satisfy a JavaScript expression.orderBy()
- Returns a cursor with documents sorted according to a sort specification.comment()
- Adds a comment to the query to identify queries in the database profiler output.hint()
- Forces MongoDB to use a specific index.maxScan()
- Limits the number of documents scanned.maxTimeMS()
- Specifies a cumulative time limit in milliseconds for processing operations on a cursor.max()
- Specifies an exclusive upper limit for the index to use in a query.min()
- Specifies an inclusive lower limit for the index to use in a query.
Query methods
all()
-one()
-asArray()
-
Scopes
Two steps are required to define a scope.
First create a custom query class for your model and define the needed scope methods in this class.
Second, override \Reach\Mongo\Document::query() to use the custom query class instead of the regular.
Using
Connecting
Getting instance of connection
Connecting to another database
Unit of work
Events
System events
init
afterFind
beforeInsert
afterInsert
beforeUpdate
afterUpdate
beforeSave
afterSave
beforeDelete
afterDelete
Caching with MongoDB
Pagination
Benchmarking
Roadmap
- Two Phase Commits (transaction)
- Behaviors: soft delete, alnum id generator
- Queries: geo
- GridFS
All versions of reach-mongo with dependencies
PHP Build Version
Package Version
The package serebro/reach-mongo contains the following files
Loading the files please wait ....