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:
@@ -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'");
|
||||
|
Reference in New Issue
Block a user