Modules | |
| Type implementation functions | |
Data Structures | |
| struct | RDB_possrep |
Functions | |
| RDB_type * | RDB_get_type (const char *name, RDB_exec_context *ecp, RDB_transaction *txp) |
| RDB_bool | RDB_type_is_numeric (const RDB_type *typ) |
| RDB_type * | RDB_dup_nonscalar_type (RDB_type *typ, RDB_exec_context *ecp) |
| RDB_type * | RDB_create_tuple_type (int attrc, const RDB_attr attrv[], RDB_exec_context *ecp) |
| RDB_type * | RDB_create_relation_type (int attrc, const RDB_attr attrv[], RDB_exec_context *ecp) |
| RDB_type * | RDB_create_relation_type_from_base (RDB_type *tpltyp, RDB_exec_context *ecp) |
| RDB_type * | RDB_create_array_type (RDB_type *basetyp, RDB_exec_context *ecp) |
| RDB_bool | RDB_type_is_scalar (const RDB_type *typ) |
| RDB_bool | RDB_type_is_relation (const RDB_type *typ) |
| RDB_bool | RDB_type_is_tuple (const RDB_type *typ) |
| RDB_attr * | RDB_type_attrs (RDB_type *typ, int *attrc) |
| int | RDB_define_type (const char *name, int repc, const RDB_possrep repv[], RDB_expression *constraintp, RDB_exec_context *ecp, RDB_transaction *txp) |
| int | RDB_drop_type (RDB_type *typ, RDB_exec_context *ecp, RDB_transaction *txp) |
| RDB_bool | RDB_type_equals (const RDB_type *typ1, const RDB_type *typ2) |
| char * | RDB_type_name (const RDB_type *typ) |
| RDB_type* RDB_create_array_type | ( | RDB_type * | basetyp, | |
| RDB_exec_context * | ecp | |||
| ) |
RDB_create_array_type creates an array type. The base type is specified by typ.
| RDB_type* RDB_create_relation_type | ( | int | attrc, | |
| const RDB_attr | attrv[], | |||
| RDB_exec_context * | ecp | |||
| ) |
Create a relation type and return a pointer to it. The attributes are specified by attrc and attrv. The fields defaultp and options of RDB_attr are ignored.
The call may also fail for a system error.
| RDB_type* RDB_create_relation_type_from_base | ( | RDB_type * | tpltyp, | |
| RDB_exec_context * | ecp | |||
| ) |
Create a relation type from a tuple type.
| RDB_type* RDB_create_tuple_type | ( | int | attrc, | |
| const RDB_attr | attrv[], | |||
| RDB_exec_context * | ecp | |||
| ) |
RDB_create_tuple_type creates a tuple type and stores a pointer to the type at the location pointed to by typp. The attributes are specified by attrc and attrv. The fields defaultp and options of RDB_attr are ignored.
The call may also fail for a system error.
| int RDB_define_type | ( | const char * | name, | |
| int | repc, | |||
| const RDB_possrep | repv[], | |||
| RDB_expression * | constraintp, | |||
| RDB_exec_context * | ecp, | |||
| RDB_transaction * | txp | |||
| ) |
RDB_define_type defines a type with the name name and repc possible representations. The individual possible representations are described by the elements of repv.
If constraintp is not NULL, it specifies the type constraint. When the constraint is evaluated, the value to check is made available as an attribute with the same name as the type.
The call may also fail for a system error, in which case the transaction may be implicitly rolled back.
| int RDB_drop_type | ( | RDB_type * | typ, | |
| RDB_exec_context * | ecp, | |||
| RDB_transaction * | txp | |||
| ) |
RDB_drop_type destroys the type specified by typ.
If the type is a scalar user-defined type, it is deleted from the database.
If the type is non-scalar, the argument txp is ignored.
It is not possible to destroy built-in types.
The call may also fail for a system error, in which case the transaction may be implicitly rolled back.
| RDB_type* RDB_dup_nonscalar_type | ( | RDB_type * | typ, | |
| RDB_exec_context * | ecp | |||
| ) |
If *typ is non-scalar, RDB_dup_nonscalar_creates a copy of it.
If the operation fails, NULL is returned.
| RDB_type* RDB_get_type | ( | const char * | name, | |
| RDB_exec_context * | ecp, | |||
| RDB_transaction * | txp | |||
| ) |
Return a pointer to RDB_type structure which represents the type with the name name.
The call may also fail for a system error, in which case the transaction may be implicitly rolled back.
| RDB_attr* RDB_type_attrs | ( | RDB_type * | typ, | |
| int * | attrc | |||
| ) |
| RDB_bool RDB_type_equals | ( | const RDB_type * | typ1, | |
| const RDB_type * | typ2 | |||
| ) |
RDB_type_equals checks if two types are equal.
Nonscalar types are equal if there definition is the same.
| RDB_bool RDB_type_is_numeric | ( | const RDB_type * | typ | ) |
RDB_type_is_numeric checks if a type is numeric.
| RDB_bool RDB_type_is_relation | ( | const RDB_type * | typ | ) |
Checks if a type is a relation type.
| RDB_bool RDB_type_is_scalar | ( | const RDB_type * | typ | ) |
RDB_type_is_scalar checks if a type is scalar.
| RDB_bool RDB_type_is_tuple | ( | const RDB_type * | typ | ) |
Checks if a type is a relation type.
| char* RDB_type_name | ( | const RDB_type * | typ | ) |
RDB_type_name returns the name of a type.
1.5.1