ColumnType
: string
in package
Database column types supported by Nextcloud's DBs.
Tags
Table of Contents
Cases
- Bigint = 'bigint'
- Binary = 'binary'
- Blob = 'blob'
- Boolean = 'boolean'
- Date = 'date'
- A datetime instance with only the date set.
- DateImmutable = 'date_immutable'
- An immutable datetime instance with only the date set.
- Datetime = 'datetime'
- A datetime instance with date and time support.
- DatetimeImmutable = 'datetime_immutable'
- An immutable datetime instance with date and time set.
- DatetimeTz = 'datetimetz'
- A datetime instance with timezone support This will be (de)serialized into a \DateTime instance, it is recommended to instead use the `DatetimeTzImmutable` instead.
- DatetimeTzImmutable = 'datetimetz_immutable'
- An immutable timezone aware datetime instance with date and time set.
- Decimal = 'decimal'
- Float = 'float'
- Guid = 'guid'
- If you want to store a GUID, you should consider using this type, as some database vendors have a native data type for this kind of data which offers the most efficient way to store it.
- Integer = 'integer'
- Json = 'json'
- JSON fields can not properly be used in WHERE statements of Oracle and MySQL.
- Smallint = 'smallint'
- String = 'string'
- Text = 'text'
- Time = 'time'
- A datetime instance with only the time set.
- TimeImmutable = 'time_immutable'
- A datetime instance with only the time set.
Methods
- getName() : string
Cases
Bigint
Tags
Binary
Tags
Blob
Tags
Boolean
Tags
Date
A datetime instance with only the date set.
This will be (de)serialized into a \DateTime instance,
it is recommended to instead use the DateImmutable instead.
Warning: When deserialized the timezone will be set to UTC.
Tags
DateImmutable
An immutable datetime instance with only the date set.
This will be (de)serialized into a \DateTimeImmutable instance,
It is recommended to use this over the Date case 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.
This will be (de)serialized into a \DateTime instance,
it is recommended to instead use the DatetimeImmutable instead.
Warning: When deserialized the timezone will be set to UTC.
Tags
DatetimeImmutable
An immutable datetime instance with date and time set.
This will be (de)serialized into a \DateTimeImmutable instance,
It is recommended to use this over the Datetime case 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
DatetimeTz
A datetime instance with timezone support This will be (de)serialized into a \DateTime instance, it is recommended to instead use the `DatetimeTzImmutable` instead.
Tags
DatetimeTzImmutable
An immutable timezone aware datetime instance with date and time set.
This will be (de)serialized into a \DateTimeImmutable instance,
It is recommended to use this over the DatetimeTz case because
out Entity class works detecting changes through the setter,
changes on mutable objects can not be detected.
Tags
Decimal
Tags
Float
Tags
Integer
Tags
Smallint
Tags
String
Tags
Text
Tags
Time
A datetime instance with only the time set.
This will be (de)serialized into a \DateTime instance,
it is recommended to instead use the TimeImmutable instead.
Warning: When deserialized the timezone will be set to UTC.
Tags
TimeImmutable
A datetime instance with only the time set.
This will be (de)serialized into a \DateTime instance.
It is recommended to use this over the DatetimeTz case because
out Entity class works detecting changes through the setter,
changes on mutable objects can not be detected.
Tags
Json
JSON fields can not properly be used in WHERE statements of Oracle and MySQL.
It is recommended to use a simple self::String field and handle JSON within PHP.
Tags
Guid
If you want to store a GUID, you should consider using this type, as some database vendors have a native data type for this kind of data which offers the most efficient way to store it.
For vendors that do not support this type natively, this type is mapped to the string type internally. Values retrieved from the database are always converted to PHP's string type or null if no data is present.
Tags
Methods
getName()
public
getName() : string