Nextcloud PHP API (master)

Types
in package

FinalYes

Database types supported by Nextcloud's DBs

Use these constants instead of \Doctrine\DBAL\Types\Type or \Doctrine\DBAL\Types\Types

Tags
since
21.0.0

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
since
21.0.0

BINARY

public string BINARY = 'binary'
Tags
since
21.0.0

BLOB

public string BLOB = 'blob'
Tags
since
21.0.0

BOOLEAN

public string BOOLEAN = 'boolean'
Tags
since
21.0.0

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
since
21.0.0

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
since
31.0.0

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
since
21.0.0

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
since
31.0.0

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
since
31.0.0

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
since
31.0.0

DECIMAL

public string DECIMAL = 'decimal'
Tags
since
21.0.0

FLOAT

public string FLOAT = 'float'
Tags
since
21.0.0

INTEGER

public string INTEGER = 'integer'
Tags
since
21.0.0

JSON

public string JSON = 'json'
Tags
since
24.0.0

SMALLINT

public string SMALLINT = 'smallint'
Tags
since
21.0.0

STRING

public string STRING = 'string'
Tags
since
21.0.0

TEXT

public string TEXT = 'text'
Tags
since
21.0.0

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
since
21.0.0

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.

Tags
since
31.0.0

        
On this page

Search results