1
0
mirror of https://github.com/dg/dibi.git synced 2025-10-29 04:37:17 +01:00

- DibiDriver::format splitted into escape() & unescape()

- added DibiConnection::unescape
- DibiPostgreDriver support escaping & unescaping BYTEA type
This commit is contained in:
David Grudl
2008-05-25 18:44:43 +00:00
parent 3728b16a21
commit c23bf15a3d
14 changed files with 401 additions and 133 deletions

View File

@@ -142,13 +142,27 @@ interface IDibiDriver
/**
* Format to SQL command.
* Encodes data for use in an SQL statement.
*
* @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string encoded value
* @throws InvalidArgumentException
*/
function format($value, $type);
function escape($value, $type);
/**
* Decodes data from resultset.
*
* @param string value
* @param string type (dibi::FIELD_BINARY)
* @return string decoded value
* @throws InvalidArgumentException
*/
function unescape($value, $type);
/**