To use these tag, add the namespace http://moyaproject.com/db to the root element.
Tags used to work with databases.
Tag | Synopsis |
---|---|
<atomic> | mark a block as being atomic |
<big-integer> | a field that stores a big integer |
<boolean> | a field that is True or False |
<bulk-create> | bulk create database objects |
<check> | check connection to the database |
<commit> | commit the current transaction |
<create> | create an object in the database |
<date> | a field that stores a date |
<datetime> | a field that stores a date and time |
<decimal> | a fix precision number |
<delete> | delete from the database |
<delete-all> | delete all objects in a table |
<float> | a field that stores a floating point number |
<foreign-key> | a key to another model |
<generic-key> | a generic foreign key |
<get> | get an object in the database. |
<get-column> | get a column from a model |
<get-exist> | get an object in the database. |
<get-one> | get precisely one matching object |
<get-or-create> | get an object from the database, or create it if it doesn't exist. |
<get-required> | get an object from the database, or return a 404 if it doesn't exist |
<if-exists> | execute a block if an object exists in the database |
<if-not-exists> | executes a block of code if an object does not exist in the db |
<inspect> | get model information |
<integer> | a field that stores an integer |
<many-to-many> | define a many to may relationship |
<model> | define a database model |
<new-query> | dynamically create a database query |
<one-to-one> | create a one to one relationship |
<property> | add a property to a database object |
<query> | query the database |
<relationship> | define a model relationship that creates a collection |
<roll-back> | roll back the current transactions |
<small-integer> | a field that stores a small integer |
<sort> | sort a query set |
<sort-map> | sort a query set dynamically |
<sql> | execute raw sql |
<string> | a field that stores a string of characters |
<string-map> | a field that stores a mapping of keys and strings |
<text> | a field that stores arbitrary length text |
<timezone> | a field that stores a timezone |
<token> | create a randomly generated token in the database |
<transaction> | commit changes to the database |
<unique-together> | require combinations of fields to be unique |
<update> | update fields in a query |
<upload> | a field to store the path of an uploaded file |
<uuid> | create a UUID in the database |