$application = $db->application[3]
SELECT * FROM application WHERE id = 3
$application = $db->author[array("name" => "X")]
SELECT * FROM author WHERE name = 'X'
foreach ($db->application()->order("title") as $application)
SELECT * FROM application ORDER BY title
$application["title"]
application.title
$application->author["name"]
SELECT * FROM author WHERE id IN (?, ?, ?)
author.name
$db->application()->where("author.name LIKE ?", $name)
SELECT application.* FROM application LEFT JOIN author ON application.author_id = author.id WHERE author.name LIKE ?
$db->author()->min("born")
SELECT MIN(born) FROM author
$application->application_tag()->count("*")
SELECT application_id, COUNT(*) FROM application_tag WHERE application_id IN (?, ?, ?) GROUP BY application_id
table.id
, cizí klíč table_id
$db = new NotORM($pdo, $structure, $cache)
echo "$application[id]: $application[name]\n"
SELECT id, name FROM application
$table->limit(1000)
$application = $db->application()->insert(array("title" => "X"))
INSERT INTO application (title) VALUES ('X')
$application->application_tag()->insert(array("tag_id" => 11))
INSERT INTO application_tag (application_id, tag_id) VALUES (?, 11)
$db->application()->update(array("title" => "X"))
UPDATE application SET title = 'X'
$db->application()->delete()
DELETE FROM application
$application->update(array("title" => "X"))
UPDATE application SET title = 'X' WHERE id = ?
$application->delete()
DELETE FROM application WHERE id = ?
NotORM_Literal
NotORM_Row
lze zdědit
$tag["name_"]
přepíšeme na $tag["name_$lang"]
E_NOTICE
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)
$db->debug = function ($query, $parameters) {}
ModelException
, DuplicateException
BaseModel::initialize($pdo)
BaseModel::getOne($table, $id)
Application::allWithTag($tag)
Application::hasTag($application, $tag)
Application::insert($data)