- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

Packages: default System System.Caching System.Collections System.Data System.Data.ActiveRecord System.Data.ActiveRecord.Relations System.Data.ActiveRecord.Scaffold System.Data.ActiveReecord.Scaffold.InputBuilder System.Data.Commom.Sqlite System.Data.Common System.Data.Common.Mssql System.Data.Common.Mysql System.Data.Common.Oracle System.Data.Common.Pgsql System.Data.Common.Sqlite System.Data.DataGateway System.Data.SqlMap System.Data.SqlMap.Configuration System.Data.SqlMap.Statements System.Exceptions System.I18N System.IO System.Security System.Util System.Web System.Web.Services System.Web.UI System.Web.UI.ActiveControls System.Web.UI.WebControls System.Web.UI.WebControls.assets System.Xml Classes: TInvalidPropertyException TLazyLoadList TObjectProxy TPropertyAccess TSqlMapApplicationCache TSqlMapCache TSqlMapConfig TSqlMapConfigurationException TSqlMapDuplicateException TSqlMapException TSqlMapExecutionException TSqlMapFifoCache TSqlMapGateway TSqlMapLruCache TSqlMapManager TSqlMapPagedList TSqlMapTypeHandler TSqlMapTypeHandlerRegistry TSqlMapUndefinedException |
Keyword
# Class TSqlMapTypeHandler
    TComponent
       |
       --TSqlMapTypeHandler
A simple interface for implementing custom type handlers. Using this interface, you can implement a type handler that will perform customized processing before parameters are set on and after values are retrieved from the database. Using a custom type handler you can extend the framework to handle types that are not supported, or handle supported types in a different way. For example, you might use a custom type handler to implement proprietary BLOB support (e.g. Oracle), or you might use it to handle booleans using "Y" and "N" instead of the more typical 0/1. Since: 3.1 Author: Wei Zhuo <weizho[at]gmail[dot]com>
Method Summary
abstract mixed | createNewInstance ( array $row) Casts the string representation of a value into a type recognized by
string | getDbType ()
abstract void | getParameter ( object The $object, object The 1) Performs processing on a value before it is used to set the parameter of a IDbCommand.
abstract mixed | getResult ( object The $string) Performs processing on a value before after it has been retrieved
void | getType ()
void | setDbType ( string $value)
void | setType ( mixed $value)
Methods Inherited From TComponent
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()
Method Details
## createNewInstance
public abstract mixed createNewInstance | (array $row )
Casts the string representation of a value into a type recognized by this type handler. This method is used to translate nullValue values into types that can be appropriately compared. If your custom type handler cannot support nullValues, or if there is no reasonable string representation for this type (e.g. File type), you can simply return the String representation as it was passed in. It is not recommended to return null, unless null was passed in.
Input
array | $row | result row.
Output
Exception
## getDbType
public string getDbType | ()
Output
string | database field type.
Exception
## getParameter
public abstract void getParameter | (object The $object , object The 1 )
Performs processing on a value before it is used to set the parameter of a IDbCommand.
Input
object The | $object | interface for setting the value.
object The | 1 | value to be set.
Output
Exception
## getResult
public abstract mixed getResult | (object The $string )
Performs processing on a value before after it has been retrieved from a database
Input
object The | $string | interface for getting the value.
Output
mixed | The processed value.
Exception
## getType
public void getType | ()
Output
Exception
## setDbType
public void setDbType | (string $value )
Input
string | $value | database field type.
Output
Exception
## setType
public void setType | (mixed $value )
Input
mixed | $value |
Output
Exception