@luanews

Powered by Jekyll

Introduction to orbit.model

Orbit’s orbit.model is an abstraction over LuaSQL that adds simple CRUD and parameterized queries, a sort of ORM super-lite. When you create a model, orbit.model introspects the database table that corresponds to your model and uses this metadata to do type conversions and build SQL statements.

Intializing models is very simple. The code below creates an orbit.model instance connected to an SQLite3 database, and then creates a model object backed by the todo_list table:

blog comments powered by Disqus