Keywords of the .c3typ type file
This page lists the keywords of the C3 "type" files (.c3typ). See also the BNF syntax for types.
| Keyword | Description | Doc |
|---|---|---|
abstract | type or method must be implemented in a sub-type | TypeMeta#isAbstract |
any | value can be any of the formally defined value types | AnyType |
as | used to create a remix with a different name | TypeMeta#remixAliases |
bigint | value is an arbitrary-length integer | BigIntType |
binary | value is binary data (bytes) | BinaryType |
boolean | value is true or false | BooleanType |
byte | value is a signed 8-bit integer | ByteType |
cached | return value of method will be computed only the first time called | MethodType#cached |
calc | field's value is produced by evaluating an expression | FieldType#isCalculated |
collection | value is any type of collection | CollectionType#isAnyCollection |
const | field's value is fixed and specified at definition type | FieldType#isConstant |
Date | used to create a datetime value in an expression | Expr |
date | value is a date-only (subset of datetime without time) | DateTimeType#noTime |
datetime | value is a date/time value | DateTimeType |
decimal | value is an extended-precision decimal number | DecimalType |
default | field or parameter has a default value | FieldType#hasDefault |
double | value is an IEEE double value (8 byte) | DoubleType |
duck | type is automatically mixed in to types which define the same set of mixins | TypeMeta#declaredDuck |
entity | type is stored in a database and automatically has persistence-related methods | Persistable |
enum | type is an enumeration of values (all fields are constants) | Enum |
event stream | notification mechanism or communication channel for events | EventStreamType |
extendable | child types of an entity are stored in the same table | Persistable |
extends | used to declare a type as being of an "extendable" parent entity | Persistable |
final | the field or method may not be further modified by sub-types | FieldType#final |
float | value is an IEEE float value (4 byte) | FloatType |
from | used to specify which parent type a method is overriding | MethodType#inheritFrom |
function | used to declare a type method | MethodType |
in | used to determine if a value is a member of a collection in an expression | Expr |
inline | minimize dispatching overhead, especially avoid making argument and return values | MethodType#inline |
instanceof | used to determine if a type is a sub-type of another in an expression | Expr |
int | value is a signed 64-bit integer | IntType |
int16 | value is a signed 16-bit integer | Int16Type |
int32 | value is a signed 32-bit integer | Int32Type |
isA | used to determine if a type is a sub-type of another in an expression | Expr |
java | method implementation is claimed in the Java language | Java |
js | method implementation is claimed in the JavaScript language | Js |
json | value is a JavaScript Object Notation (JSON) structure | JsonType |
lambda | value is a callable object | LambdaType |
map | value is a collection maping keys to values | MapType |
member function | used to declare a type member method | MethodType |
mixes | used to indicate that a type includes the behavior of a parent type | TypeMeta#mixins |
mixing | used to indicate that the type will be refined to that of the sub-type | ReferenceType#mixing |
native | value is not formally defined and will differ between languages | NativeType |
no tz | datetime value is logical, not anchored to a time zone | DateTimeType#noTimeZone |
not extendable | type does not allow sub-types to use "extends" or "extendable" | TypeMeta#declaredNotExtendable |
not mixable | type does not allow sub-types | TypeMeta#declaredNotMixable |
not persistable | field is not persisted in the database | FieldType#notPersistable |
not remixable | type does not allow remixes | TypeMeta#declaredNotRemixable |
number | value is any of the defined numeric types (integer or real) | NumberType |
optional | method may be implemented in a sub-type | MethodType#optional |
period | the recalculation period for fields that are "periodic calc" | FieldType#calcPeriod |
periodic | used with "calc" to defined a periodically recalculated field | FieldType#calcPeriod |
private | type, field or method is not accessible outside the declaring package | MethodType#private |
property | type method exposed with property access (not as function call) | MethodType#property |
push stream | value is a notification mechanism for a stream of data | PushStreamType |
py | method implementation is claimed in the Python language | Py |
remix | type is a remix of another type | TypeMeta#declaredRemix |
schedule | the recalculation schedule for fields that are "scheduled calc" | FieldType#calcSchedule |
scheduled | used with "calc" to defined a scheduled recalculated field | FieldType#calcSchedule |
schema name | specify the database table/column column name for persistance | FieldType#schemaName |
schema suffix | a suffix for the database column column name into which a field will be persisted | FieldType#schemaSuffix |
serialized | define the format of a string or json field in terms of a type | StringSerializable |
set | value is a unique collection of elements | SetType |
stateful | indicates that a method is not a pure function of its arguments | FunctionType#stateful |
stored | used with "calc" to indicate that a field's calculated value should be persisted | FieldType#isStoredCalculated |
stream | value is a sequence of elements, possibly exceeding what will fit in memory | StreamType |
string | value is a string of Unicode characters (UTF-8 encoding between processes) | StringType |
translate by | specifies that a field's value is translated | FieldType#translatedBy |
ts | method implementation is claimed in the TypeScript language | Ts |
tsx | method implementation is claimed in the TypeScript language with JSX extensions | Tsx |
tuple | value is a tuple of any shape | TupleType#isAnyTuple |
type | used to declare a new type | TypeMeta |
type key | the key used to identify a type's position in a hieararchy of extendable types | TypeMeta#declaredTypeKey |
union | a type that declares values must be one of a set of other types | TypeMeta#isUnion |
utc | datetime value is always in Coordinated Universal Time (UTC) | DateTimeType#forceUtc |
void | value is not produced/expected (will always be null) | VoidType |
with micros | datetime has microsecond resolution (10⁻⁶) | DateTimeType#withMicros |
with millis | datetime has millisecond resolution (10⁻³) | DateTimeType#withMillis |
with nanos | datetime has nanosecond resolution (10⁻⁹) | DateTimeType#withNanos |