Types supported out of the box
This section contains a list of base type names and names of built-in range types understood by
DefaultTypeConverterFactory, those can be converted without setting up the Connection. This allows
using the factory separately e.g. with PDO.
The preconfigured mappings from PHP class names to database types are also given.
Type names known to DefaultTypeConverterFactory
Note the following when reading the table:
Type names in
lowercaseare PostgreSQL’s internal, corresponding to rows inpg_catalog.pg_type. Those inUPPERCASEare their SQL standard synonyms.sad_spirit\pg_wrapper\convertersnamespace prefix is assumed for all converter class names.sad_spirit\pg_wrapper\typesnamespace prefix is assumed for all complex type class names that do not start with a backslash.“Compatible
array” is an array that will be accepted bycreateFromArray()method of type’s class.
Type names |
|
Non-null PHP value returned |
Non-null PHP values accepted |
|---|---|---|---|
|
|
|
anything, PHP values
evaluating to |
|
|
|
|
|
|
|
|
|
|
|
numeric values |
|
|
|
|
|
|
|
|
|
|
usually an |
anything
|
|
|
instance of
|
|
|
|
||
|
|
||
|
|
||
|
|
||
|
|
instance of
|
|
|
|
usually an |
anything
|
|
|
instance of |
instance of |
|
|
instance of |
instance of |
|
|
instance of |
instance of |
|
|
instance of |
instance of
|
|
|
instance of |
instance of |
|
|
instance of |
instance of |
|
|
instance of |
instance of |
|
|
instance of |
instance of |
|
|
|
|
|
|
|
single-dimension |
Type names |
|
Non-null PHP value returned |
Non-null PHP values accepted |
|---|---|---|---|
|
|
instance of
|
instance of
|
|
|
||
|
|
instance of
|
instance of
|
|
|
||
|
|
||
|
|
instance of
|
instance of
|
|
|
||
|
|
instance of
|
instance of
|
|
|
||
|
|
Classes mapped to database types
Passing instances of the below classes (sad_spirit\pg_wrapper\types namespace prefix is assumed for all names
that do not start with a backslash) as query parameters does not require specifying parameter types.
Converters for database types in the second column will be used.
Class name |
Database type |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|