Types
in package
Database types supported by Nextcloud's DBs
Use these constants instead of \Doctrine\DBAL\Types\Type or \Doctrine\DBAL\Types\Types
Tags
Table of Contents
Constants
- BIGINT = 'bigint'
- BINARY = 'binary'
- BLOB = 'blob'
- BOOLEAN = 'boolean'
- DATE = 'date'
- A datetime instance with only the date set.
- DATE_IMMUTABLE = 'date_immutable'
- An immutable datetime instance with only the date set.
- DATETIME = 'datetime'
- A datetime instance with date and time support.
- DATETIME_IMMUTABLE = 'datetime_immutable'
- An immutable datetime instance with date and time set.
- DATETIME_TZ = 'datetimetz'
- A datetime instance with timezone support This will be (de)serialized into a \DateTime instance, it is recommended to instead use the `DATETIME_TZ_IMMUTABLE` instead.
- DATETIME_TZ_IMMUTABLE = 'datetimetz_immutable'
- An immutable timezone aware datetime instance with date and time set.
- DECIMAL = 'decimal'
- FLOAT = 'float'
- INTEGER = 'integer'
- JSON = 'json'
- SMALLINT = 'smallint'
- STRING = 'string'
- TEXT = 'text'
- TIME = 'time'
- A datetime instance with only the time set.
- TIME_IMMUTABLE = 'time_immutable'
- A datetime instance with only the time set.
Constants
BIGINT
public
string
BIGINT
= 'bigint'
Tags
BINARY
public
string
BINARY
= 'binary'
Tags
BLOB
public
string
BLOB
= 'blob'
Tags
BOOLEAN
public
string
BOOLEAN
= 'boolean'
Tags
DATE
A datetime instance with only the date set.
public
string
DATE
= 'date'
This will be (de)serialized into a \DateTime instance,
it is recommended to instead use the DATE_IMMUTABLE
instead.
Warning: When deserialized the timezone will be set to UTC.
Tags
DATE_IMMUTABLE
An immutable datetime instance with only the date set.
public
string
DATE_IMMUTABLE
= 'date_immutable'
This will be (de)serialized into a \DateTimeImmutable instance,
It is recommended to use this over the DATE
type because
out Entity
class works detecting changes through the setter,
changes on mutable objects can not be detected.
Warning: When deserialized the timezone will be set to UTC.
Tags
DATETIME
A datetime instance with date and time support.
public
string
DATETIME
= 'datetime'
This will be (de)serialized into a \DateTime instance,
it is recommended to instead use the DATETIME_IMMUTABLE
instead.
Warning: When deserialized the timezone will be set to UTC.
Tags
DATETIME_IMMUTABLE
An immutable datetime instance with date and time set.
public
string
DATETIME_IMMUTABLE
= 'datetime_immutable'
This will be (de)serialized into a \DateTimeImmutable instance,
It is recommended to use this over the DATETIME
type because
out Entity
class works detecting changes through the setter,
changes on mutable objects can not be detected.
Warning: When deserialized the timezone will be set to UTC.
Tags
DATETIME_TZ
A datetime instance with timezone support This will be (de)serialized into a \DateTime instance, it is recommended to instead use the `DATETIME_TZ_IMMUTABLE` instead.
public
string
DATETIME_TZ
= 'datetimetz'
Tags
DATETIME_TZ_IMMUTABLE
An immutable timezone aware datetime instance with date and time set.
public
string
DATETIME_TZ_IMMUTABLE
= 'datetimetz_immutable'
This will be (de)serialized into a \DateTimeImmutable instance,
It is recommended to use this over the DATETIME_TZ
type because
out Entity
class works detecting changes through the setter,
changes on mutable objects can not be detected.
Tags
DECIMAL
public
string
DECIMAL
= 'decimal'
Tags
FLOAT
public
string
FLOAT
= 'float'
Tags
INTEGER
public
string
INTEGER
= 'integer'
Tags
JSON
public
string
JSON
= 'json'
Tags
SMALLINT
public
string
SMALLINT
= 'smallint'
Tags
STRING
public
string
STRING
= 'string'
Tags
TEXT
public
string
TEXT
= 'text'
Tags
TIME
A datetime instance with only the time set.
public
string
TIME
= 'time'
This will be (de)serialized into a \DateTime instance,
it is recommended to instead use the TIME_IMMUTABLE
instead.
Warning: When deserialized the timezone will be set to UTC.
Tags
TIME_IMMUTABLE
A datetime instance with only the time set.
public
string
TIME_IMMUTABLE
= 'time_immutable'
This will be (de)serialized into a \DateTime instance.
It is recommended to use this over the DATETIME_TZ
type because
out Entity
class works detecting changes through the setter,
changes on mutable objects can not be detected.