{"repo":"apioo/psx-sql","free":true,"listed":false,"github":"https://github.com/apioo/psx-sql","clone":"git clone https://github.com/apioo/psx-sql.git","description":"Generate type-safe PHP classes from your database","language":"PHP","stars":17,"topics":["php","database","sql","generator","table","type-safe"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"SQL This library generates type-safe PHP classes from your database tables and thus allows you to interact with your database in a complete type-safe way. In traditional ORMs you write a class add specific metadata and generate based on this class your tables, this means our source code defines how a table should look. This library thinks the other way around (database first), this means you first build your database schema i.e. through a tool like doctrine migrations and then you can use this library to automatically generate all repository and model classes based on the table schema. This has the great advantage that we can generate completely typed repositories. We automatically generate a class for each row (entity) and a repository which accepts this row. This concept is not new and the Java world has i.e. jOOQ which also follows this idea. It of course means also that you need to regenerate your classes if you change your schema. Generate To generate the table and row classes you can either integrate the PSX\\Command\\GenerateCommand into your Symfony console app or you can also do this programmatically through the PSX\\Sql\\Generator class s. Basic usage The following are basic examples how you can work with a generated table class. Table The following is an example of a generated table class. Row The following is an example of a generated table row. Column The following is an example of a generated table column. Filter To filter collections this library provider also a fi","default_branch":null,"files":null,"tree":[],"storefront":"/r/apioo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/apioo/psx-sql/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."}