-
Notifications
You must be signed in to change notification settings - Fork 4
Levure Configuring a Levure application
The SQL Yoga repo includes the necessary files to work as a Helper in the Levure framework. Using SQL Yoga with Levure simplifies configuration and development work.
The simplest way is to download the SQL Yoga repository, rename the folder to "sql yoga" and place it in your applications "helpers" folder. The next time you open your application in the IDE SQL Yoga will be loaded.
In the app.yml file you tell SQL Yoga where to find your database configuration files. Add the following to the app.yml file.
app.yml
sql yoga:
configuration:
- filename: ./database
Since you told SQL Yoga that configuration files are stored in a database folder you now need to create the folder. Create the database folder in the app folder (alongside the ui, behaviors, etc. folders).
In the ./app/database folder create a file named connections.yml. Configure a connection that points to the database file. Here is a SQLite example that points to a .sqlite file in the ./app/database folder:
default connection: local
connections:
local:
adaptor: sqlite
file: ./database/to-do.sqlite
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