Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EDT:EGL Language Primitive Types"
Line 23: | Line 23: | ||
| done<br> | | done<br> | ||
|- | |- | ||
− | | bgcolor="# | + | | bgcolor="#999999" | ''String(N)'' |
− | | | + | | | <span style="background: none repeat scroll 0% 0% rgb(255, 165, 0);">reference</span> |
− | | | + | | | 1d {{bug|366892}}<br> |
− | | | + | | | 1d {{bug|366893}}<br> |
− | | | + | | | 1d [https://bugs.eclipse.org/bugs/show_bug.cgi?id=352364 Limited string support] <br> |
|- | |- | ||
| bgcolor="#cccccc" | ''String'' | | bgcolor="#cccccc" | ''String'' | ||
Line 75: | Line 75: | ||
|- | |- | ||
− | | bgcolor="# | + | | bgcolor="#999999" | ''Blob'' |
− | | | + | | | reference |
− | | | + | | | <br>done |
− | | | + | | | N/S<br> |
− | | | + | | | 1d |
− | 1d | + | |
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=352367 Blob support] | [https://bugs.eclipse.org/bugs/show_bug.cgi?id=352367 Blob support] | ||
|- | |- | ||
− | | bgcolor="# | + | | bgcolor="#999999" | ''Clob'' |
− | | | + | | | reference |
− | | | + | | | <br>done |
− | | | + | | | N/S<br> |
− | | | + | | | 1d |
− | 1d | + | |
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=352368 Clob support] | [https://bugs.eclipse.org/bugs/show_bug.cgi?id=352368 Clob support] | ||
Line 147: | Line 145: | ||
|- | |- | ||
− | | bgcolor="# | + | | bgcolor="#999999" | ''Bytes(N)''<sup>''4''</sup> |
− | | | + | | | value |
− | | | + | | | <br>2d |
− | | | + | | | 0.5d<br> |
− | | | + | | | 0.5d |
− | 0.5d | + | |
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=352371 Bytes with length support] | [https://bugs.eclipse.org/bugs/show_bug.cgi?id=352371 Bytes with length support] | ||
|- | |- | ||
− | | bgcolor="# | + | | bgcolor="#999999" | ''Bytes''<sup>''5''</sup> |
− | | | + | | | reference |
− | | | + | | | 1d<br> |
− | | | + | | | 0.5d<br> |
− | | | + | | | 0.5d |
− | 0.5d | + | |
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=352372 Bytes without length support] | [https://bugs.eclipse.org/bugs/show_bug.cgi?id=352372 Bytes without length support] | ||
+ | |- | ||
+ | | bgcolor="#999999" | ''Time''<sup>''1''</sup><br> | ||
+ | | | <br> | ||
+ | | [https://bugs.eclipse.org/bugs/show_bug.cgi?id=370017 Time support] | ||
+ | | [https://bugs.eclipse.org/bugs/show_bug.cgi?id=370019 Time support] | ||
+ | | [https://bugs.eclipse.org/bugs/show_bug.cgi?id=370018 Time support] | ||
|- | |- | ||
| bgcolor="#ffff00" | ''Char''<br> | | bgcolor="#ffff00" | ''Char''<br> | ||
Line 196: | Line 198: | ||
| bgcolor="#ffff00" | N/S | | bgcolor="#ffff00" | N/S | ||
| bgcolor="#ffff00" | N/S | | bgcolor="#ffff00" | N/S | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| bgcolor="#ffff00" | ''Interval''<sup>''1''</sup><br> | | bgcolor="#ffff00" | ''Interval''<sup>''1''</sup><br> |
Revision as of 17:57, 27 January 2012
Please see the parent of this page, EDT:EGL Language.
Primitive Types (Table 3)
Primitive Types | Value or Reference? | Core | JavaScript Nullable Types |
Java |
Any | reference | done |
1.5d |
done |
Boolean | value | done |
done |
done |
String(N) | reference | 1d bug 366892 |
1d bug 366893 |
1d Limited string support |
String | reference8 | done | done |
done |
Date1 |
value |
done |
1d |
done |
Timestamp(pattern)1 |
value | done |
0.5d |
done |
Timestamp1,6 |
reference8 | done | 0.5d |
done |
Blob | reference | done |
N/S |
1d |
Clob | reference | done |
N/S |
1d |
Smallint | value | done |
done |
done |
Int | value | done |
done |
done |
Bigint | value | done |
done |
done |
Decimal(N,M)7 | value | done |
done |
done |
Decimal2 | reference | done |
done |
done |
Float | value | done |
done |
done |
Smallfloat | value | done |
done |
done |
Number3 | reference | done bug 354146 |
done |
1d |
Bytes(N)4 | value | 2d |
0.5d |
0.5d |
Bytes5 | reference | 1d |
0.5d |
0.5d |
Time1 |
|
Time support | Time support | Time support |
Char |
|
done |
N/S | N/S |
Dbchar |
|
done |
N/S | N/S |
Mbchar |
|
done |
N/S | N/S |
Unicode |
|
done |
N/S | N/S |
Hex4 |
|
done |
N/S | N/S |
Interval1 |
|
1d |
N/S | N/S |
Bin |
|
done |
N/S | N/S |
Num |
|
done |
N/S | N/S |
Numc |
|
done |
N/S | N/S |
Pacf |
|
done |
N/S | N/S |
Money |
|
done |
N/S | N/S |
Notes on Table 3
- Date and timestamp are the only supported date/time types. Use a timestamp in place of RBD's time. You might be able to use a numeric type in place of RBD's interval.
- Decimal with no length or decimals is a reference type with an immutable value.
- Number is a reference type with an immutable value. Unlike in RBD, number variables can be declared anywhere a variable declaration is allowed.
- Bytes(N) is a value type similar to RBD's hex. N indicates the number of bytes in the value. (In RBD, the length of a hex is the number of nibbles not the nubmer of bytes.)
- Bytes with no length is a reference type with an immutable value of any length.
- Timestamp with no pattern is a reference type in EDT. It can hold any timestamp value.
- As in RBD, it's OK to only specify the length when using the decimal type. Decimal(N) is internally mapped to decimal(N,0).
- These will be value types in 0.7 but they'll change to references in 1.0.
More about the Bytes type
Bytes is meant to hold data with no particular format.
Assignment between two bytes values with no length is a reference assignment. Assignment between two bytes values when one or both has a length is a value assignment (data is copied). If the source is longer bytes on its right side are truncated. If the source is shorter then we don't add padding: we just don't update what was there before. For example if your bytes(3) is 0x123456 and you assign it a bytes(1) value of 0x99 then the bytes(3) ends up with 0x993456.
In order for two bytes values to be compared, they must both have a size, and the sizes must be equal. The comparison is done one byte at a time, from left to right, until a difference is found. The operand with a one instead of a zero is greater.
The bytes type supports the substring operator. The type of the result is bytes (with no length).