-
Notifications
You must be signed in to change notification settings - Fork 4
Schema
A Database object stores the schema of the database in an internal Schema object. The information about the database tables and fields stored in the Schema object is what enables many of SQL Yoga's features.
If SQL Yoga does not have a schema object stored in the database object when it connects to a database then the schema object will be created by asking the database for information about the tables and columns contained in it. This will occur every time you load SQL Yoga and connect to a database unless you specifically set the schema object before connecting to the database.
When using SQL Yoga with Levure you can import the database schame into the schema.yml
file as described here. This schema.yml
file will be loaded at startup and will set the schema object. This will be faster than reading in the database properties each time you load SQL Yoga.
If your schema changes then you will need to update the schema.yml
file. SQL Yoga includes helper functions for doing this automatically.
SQL Yoga USER GUIDE
- Home
- SQL Yoga Objects
- Database Objects
- Connection Objects
- SQL Query Objects
- SQL Record Objects
- Table Objects
- Table Object Behaviors
- Relationships
- Scopes
- Schema
- Working with User Search Strings
- SQL Query Template Objects
- Error Handling
- Migrating from SQL Yoga 1.x
- Integrating with the Levure Application Framework