User Tools

Site Tools


type_class

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

type_class [2024/02/14 14:03] – created sahltype_class [2024/04/30 13:59] (current) sahl
Line 3: Line 3:
 The type class is used to describe data types for [[Datarecord class|Datarecord]] objects. Platform has a large number of builtin types. The type class is used to describe data types for [[Datarecord class|Datarecord]] objects. Platform has a large number of builtin types.
  
-===== Basic types =====+^ Type                 ^ SQL                ^ Null?^ Form field                  ^PHP                   ^ 
 +| AddressType          | Uses subfields     | Yes  | [[Class AddressField]]      | array                | 
 +| ArrayType            | MEDIUMTEXT         | No   | [[Class MultiField]](1)     | array                | 
 +| BigTextType          | MEDIUMTEXT         | No   | [[Class TextareaField]]     | string               | 
 +| BoolType             | TINYINT(1)         | No   | [[Class CheckboxField]]     | bool                 | 
 +| CurrencyType         | Uses subfields     | No   | [[Class CurrencyField]]     | array                | 
 +| DateTimeType         | DATETIME           | Yes  | [[Class DatetimeField]]     | [[Class Time]]       | 
 +| DateType             | DATETIME           | Yes  | [[Class DatetimeField]]     | [[Class Time]]       | 
 +| EmailType            | VARCHAR(256)       | No   | [[Class EmailField]]        | string               | 
 +| EnumerationType      | INT                | Yes  | [[Class SelectField]]       | int                  | 
 +| FileType             | INT                | Yes  | [[Class FileField]]         | int                  | 
 +| FloatType            | DOUBLE             | Yes  | [[Class NumberField]]       | float                | 
 +| HTMLTextType         | MEDIUMTEXT         | No   | [[Class TexteditorField]]   | string               | 
 +| HyperReferenceType   | Uses subfields     | No   | None                        | array                | 
 +| ImageType            | INT                | Yes  | [[Class FileField]]         | int                  | 
 +| IntegerType          | INT                | Yes  | [[Class NumberField]]       | int                  | 
 +| KeyType              | INT                | No   | None                        | int                  | 
 +| MultiEnumerationType | VARCHAR(4096)      | No   | [[Class MulticheckboxField]]| array                | 
 +| MultiReferenceType   | MEDIUMTEXT         | No   | [[Class MultidatarecordcomboboxField]]| array      | 
 +| ObjectType           | MEDIUMTEXT         | Yes  | None                        | object               | 
 +| PasswordType         | VARCHAR(256)       | Yes  | [[Class PasswordField]]     | string               | 
 +| RepetitionType       | VARCHAR(1024)      | Yes  | [[Class RepetitionField]]   | [[Class Repetition]] | 
 +| SingleReferenceType  | INT                | Yes  | [[Class DatarecordcomboboxField]]| int             | 
 +| TextType             | VARCHAR(255)       | No   | [[Class TextField]]         | string               |
  
-==== BigTextType ==== 
- 
-^PHP type|string| 
-^Javascript type|string| 
-^SQL field|MEDIUMTEXT| 
-^Can be null|No| 
-^Form field|[[TextareaField class]]| 
-^Visual|html entity encoded and line breaks replaced with <br>| 
- 
-This object is used for storing large text segments of unformatted text. 
- 
-==== BoolType ==== 
- 
-^PHP type|bool| 
-^Javascript type|bool| 
-^SQL field|TINYINT(1)| 
-^Can be null|No| 
-^Form field|[[CheckboxField class]]| 
-^Visual|Yes or no| 
- 
-===== Advanced types ===== 
- 
-==== ArrayType ==== 
- 
-^PHP type|array| 
-^Javascript type|array| 
-^SQL field|MEDIUMTEXT containing json array| 
-^Can be null|Yes| 
-^Form field|[[MultiplierSection class]] or [[MultiField class]]| 
-^Visual|Either a comma-separated range of values or no default view| 
- 
-This type can be used in two ways. The default way will just store an array of strings and display a multiplier field where one can input one or more values. 
- 
-For more complex usage it is also possible to define a more complex data structure, by adding a substructure to the type, which is an array of other types. The field will then hold an array of sub-objects defined by the substructure types and are also able to display a form for editing this substructure.  
- 
-==== CurrencyType ==== 
- 
-^PHP type|array| 
-^Javascript type|object| 
-^SQL field|none| 
-^Can be null|Yes| 
-^Form field|[[CurrencyField class]]| 
-^Visual|Value in foreign currency| 
- 
-This field uses three sub fields localvalue (FloatType), currency (TextType) and foreignvalue (FloatType) where //localvalue// holds the value in local currency (which should be used for calculations etc), //currency// holds the currency abbreviation and //foreignvalue// holds the corresponding value in foreign currency. 
-The PHP and javascript value are arrays/objects with element named in the same way. 
  
type_class.txt · Last modified: 2024/04/30 13:59 by sahl

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki