{"repo":"mibk/LeanMapperQuery","free":true,"listed":false,"github":"https://github.com/mibk/LeanMapperQuery","clone":"git clone https://github.com/mibk/LeanMapperQuery.git","description":"Concept of Query Object for LeanMapper","language":"PHP","stars":10,"topics":["php","php-library","leanmapper","database"],"license":"MIT","category":"databases-storage","readme_excerpt":"Lean Mapper Query ================= Lean Mapper Query is a concept of a query object for Lean Mapper library which helps to build complex queries using automatic joins ( idea taken from NotORM library ). Look at the suggested base classes. For Czech documentation have a look at the wiki. Features -------- - behaves as a SQL preprocessor, hence most SQL expressions are available - automatic joins using the dot notation ( @book.tags.name ) - ability to query repositories or entities - support for implicit filters Installation ------------ It can be installed via Composer. What does it do? ---------------- Suppose we have the following repositories: and the following entities: We build a query : Now, if we want to get all books whose author's name is Karel, we have to do this: The database query will look like this: You can see it performs automatic joins via the dot notation . It supports all relationship types known to Lean Mapper . It is very easy to use SQL functions. We can update query like this: which changes the database query into the following: Don't repeat yourself --------------------- You can extend the Query class and define your own methods. Querying entities ----------------- It is also possible to query an entity property ( currently only those properties with BelongsToMany or HasMany relationships ). Let's make the BaseEntity class: Note that BaseEntity must extend LeanMapperQuery\\Entity to make the following possible. We have defined the find method as protect","default_branch":null,"files":null,"tree":[],"storefront":"/r/mibk","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mibk/LeanMapperQuery/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}