Skip to content
aaronbee edited this page Sep 14, 2010 · 8 revisions

The basics are the following:
Suppose we have a User entity with a field name.
u = User.new creates a new user.
u.name gets the name attribute.
u.put("name", "Alice") sets the name attribute to “Alice”.
u.name = "Alice" does the same as above as long as you have the following line in your User model:
include PIQLEntity
Right now it is required that there is a file in the models directory for each entity, lowercased.

Anytime you read or write from the database you need to pass in $piql_env as the last argument.

u.save($piql_env) saves the user to the database.

Clone this wiki locally