1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-12 00:54:11 +02:00

- added dibi::setSubstFallBack()

- added DibiFluent::fetch()
This commit is contained in:
David Grudl
2008-06-08 12:44:44 +00:00
parent c23bf15a3d
commit 4e41f1641e
4 changed files with 93 additions and 10 deletions

View File

@@ -18,9 +18,27 @@ dibi::addSubst('blog', 'wp_');
dibi::test("UPDATE [:blog:items] SET [text]='Hello World'");
// create new substitution :: (empty) ==> my_
dibi::addSubst('', 'my_');
// generate and dump SQL
dibi::test("UPDATE [database.::table] SET [text]='Hello World'");
function substFallBack($expr)
{
return 'the_' . $expr;
}
// create substitution fallback
dibi::setSubstFallBack('substFallBack');
// generate and dump SQL
dibi::test("UPDATE [:account:user] SET [name]='John Doe'");