panSL language reference. Table of contents.
Describes what kind a data a Property of a given PropertyType may contain.
ShortText is the default DataType. Properties of this datatype may contain any kind of text or numbers.
Example of how some of the DataTypes, Date, SMS, EMail and URL, may be used:
Person
Name
Date_of_birth Date
Mobil_phone_number SMS
Email_address EMail
Home_page URL
Field name | Description |
Date | A date, like December 9th 2013. It is not possible to store time-values in a Property with DataType Date. See DateAndTime if you need to store both a date and time in one single value. |
DateAndTime | A date with time like December 9th 2013 12:00 PM. If you only need to store the date, use the DataType Date instead. |
Decimal | Any number, including numbers with decimals. |
E-mail address. In MyLittleDatabase this is used as a LoginIdentificator (the system may send a login code to the user of an ApplicationImplementation to the designated EMail address) Declaring a property of this DataType will automatically enable login functionality in the autogenerated GUI of MyLittleDatabase. | |
Existence | Describes that a choice has to be made. Existence is used for enumerations (Enum). The keyword is usually not shown because enumerations are usually simplified by the different PropertyTypes beeing placed together on the same line separated by comma. |
Formula | The Property value is given by a formula, written as "=[Expression]" where [Expression] is any kind of expression consisting of one or more Functions (see also FunctionCategory) and Operators giving a result of one of the other DataTypes. Examples Formulas may be:
An Implementation of panSL should support all common spreadsheet Operators and Functions. Note that identifiers (name of PropertyTypes) can also be referred to in formulas in PascalCase. That is Date_of_birth can be referred to like DateOfBirth if preferred. See also DefaultFormula. |
Heading | Used for PropertyTypes with children. Is usually not shown in a panSL-schema. PropertyType Heading for enumerations are not shown at all. PropertyType Heading together with requirement ChooseOne designates a sub-classes and is simplified as Type. |
History | In the autogenerated GUI of MyLittleDatabase.com a property of this type will enable logging of access and sending of messages. History must be specified with HistoryType, that is, what kind of access should be logged, for instance Create, Update and Delete. Usually the simplification Log is used. Example:
In the example all changes to a person entity will be logged under the heading "Changes". |
Integer | A whole number without decimals. |
LongText | Suitable for properties which can contain any kind of long text. For instance like Contract_text. In principle properties of type ShortText may also contain long text. But a typical panSL Implementation like AgoRapide or MyLittleDatabase will render more appropriate controls, for instance controls capable of showing multiple lines, when the DataType LongText is used. Corresponds to the object-class "string" in a typical programming language. |
Password | Declaring a property of this type together with a property of type Username will automatically enable login functionality in the autogenerated GUI of MyLittleDatabase.com Example:
|
Percent | A number representing a percentage like 28%. Example:
|
Relation | Relation between entities. The PropertyType is usually duplicated at two places, once for each end of the relation. In order for a relation to be correctly recognized the name of the PropertyType has to be identical on both sides. Example defining how one person may own multiple cars while a car must have a single owner
In the example above the DataType Relation and Cardinality ZeroToMany has been simplified as RelationMany and the DataType Relation and Cardinality Obligatory has been simplified as RelationOne. The same example in complex panSL would look like this:
|
ShortText | Designates properties which can contain any kind of short text. For en Entity called Person typical ShortText fields could be First_name and Last_name. Note that DataType ShortText and Cardinality Obligatory is usually not shown at all (see Simplification Nothing). See LongText for properties which may have to contain a lot of text. In principle properties of type ShortText may also contain long texts but a typical panSL Implementation like AgoRapide or MyLittleDatabase will make it easier to read the field values when PropertyType LongText is used instead. Corresponds to the object-class "string" in a typical programming language. |
SMS | Mobile phone number which can receive SMS-messages. In MyLittleDatabase this is used as a LoginIdentificator (the system may send a login code to the user of an ApplicationImplementation to the designated SMS-number). Declaring a property of this DataType will automatically enable login functionality in the autogenerated GUI of MyLittleDatabase. Values must start with + followed by the international country code, like +47 for Norway or +1 for North America. |
URL | Any kind of URL, like http://AgoRapide.com or "ftp://AgoRapide.com". Values should start with the protocol type, for instance "http://" for the http-protocol. This will enable Implementations of panSL like MyLittleDatabase to offer live working links in the autogenerated GUI. |
Username | Declaring a property of this DataType together with a property of type Password will automatically enable login functionality in the autogenerated GUI of MyLittleDatabase.com Example:
|
panSL language reference. Table of contents.
More samples available at http://panSL.org/samples/.
Last updated 2012-05-02