Merge pull request #9004 from blueskies79/patch-2

Update 04_Data_Types_and_Casting
This commit is contained in:
Loz Calver 2019-05-30 09:23:06 +01:00 committed by GitHub
commit 487beb40ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,19 +29,19 @@ class Player extends DataObject
## Available Types
* [DBBoolean](api:SilverStripe\ORM\FieldType\DBBoolean): A boolean field.
* [DBCurrency](api:SilverStripe\ORM\FieldType\DBCurrency): A number with 2 decimal points of precision, designed to store currency values.
* [DBDate](api:SilverStripe\ORM\FieldType\DBDate): A date field
* [DBDecimal](api:SilverStripe\ORM\FieldType\DBDecimal): A decimal number.
* [DBEnum](api:SilverStripe\ORM\FieldType\DBEnum): An enumeration of a set of strings
* [DBHTMLText](api:SilverStripe\ORM\FieldType\DBHTMLText): A variable-length string of up to 2MB, designed to store HTML
* [DBHTMLVarchar](api:SilverStripe\ORM\FieldType\DBHTMLVarchar): A variable-length string of up to 255 characters, designed to store HTML
* [DBInt](api:SilverStripe\ORM\FieldType\DBInt): An integer field.
* [DBPercentage](api:SilverStripe\ORM\FieldType\DBPercentage): A decimal number between 0 and 1 that represents a percentage.
* [DBDatetime](api:SilverStripe\ORM\FieldType\DBDatetime): A date / time field
* [DBText](api:SilverStripe\ORM\FieldType\DBText): A variable-length string of up to 2MB, designed to store raw text
* [DBTime](api:SilverStripe\ORM\FieldType\DBTime): A time field
* [DBVarchar](api:SilverStripe\ORM\FieldType\DBVarchar): A variable-length string of up to 255 characters, designed to store raw text.
* `'Boolean'`: A boolean field (see: [DBBoolean](api:SilverStripe\ORM\FieldType\DBBoolean)).
* `'Currency'`: A number with 2 decimal points of precision, designed to store currency values (see: [DBCurrency](api:SilverStripe\ORM\FieldType\DBCurrency)).
* `'Date'`: A date field (see: [DBDate](api:SilverStripe\ORM\FieldType\DBDate)).
* `'Decimal'`: A decimal number (see: [DBDecimal](api:SilverStripe\ORM\FieldType\DBDecimal)).
* `'Enum'`: An enumeration of a set of strings (see: [DBEnum](api:SilverStripe\ORM\FieldType\DBEnum)).
* `'HTMLText'`: A variable-length string of up to 2MB, designed to store HTML (see: [DBHTMLText](api:SilverStripe\ORM\FieldType\DBHTMLText)).
* `'HTMLVarchar'`: A variable-length string of up to 255 characters, designed to store HTML (see: [DBHTMLVarchar](api:SilverStripe\ORM\FieldType\DBHTMLVarchar)).
* `'Int'`: An integer field (see: [DBInt](api:SilverStripe\ORM\FieldType\DBInt)).
* `'Percentage'`: A decimal number between 0 and 1 that represents a percentage (see: [DBPercentage](api:SilverStripe\ORM\FieldType\DBPercentage)).
* `'Datetime'`: A date / time field (see: [DBDatetime](api:SilverStripe\ORM\FieldType\DBDatetime)).
* `'Text'`: A variable-length string of up to 2MB, designed to store raw text (see: [DBText](api:SilverStripe\ORM\FieldType\DBText)).
* `'Time'`: A time field (see: [DBTime](api:SilverStripe\ORM\FieldType\DBTime)).
* `'Varchar'`: A variable-length string of up to 255 characters, designed to store raw text (see: [DBVarchar](api:SilverStripe\ORM\FieldType\DBVarchar)).
See the [API documentation](api:SilverStripe\ORM\FieldType\DBField) for a full list of available Data Types. You can define your own [DBField](api:SilverStripe\ORM\FieldType\DBField) instances if required as well.