Constraint functions


Functions

int RDB_create_constraint (const char *name, RDB_expression *exp, RDB_exec_context *ecp, RDB_transaction *txp)
int RDB_drop_constraint (const char *name, RDB_exec_context *ecp, RDB_transaction *txp)

Function Documentation

int RDB_create_constraint ( const char *  name,
RDB_expression *  exp,
RDB_exec_context *  ecp,
RDB_transaction *  txp 
)

RDB_create_constraint creates a constraint with the name name on the database the transaction specified by txp interacts with.

Returns:
RDB_OK on success, RDB_ERROR if an error occurred.
Errors:
RDB_NO_RUNNING_TX_ERROR
txp does not point to a running transaction.
RDB_TYPE_MISMATCH_ERROR
The expression specified by constrp is not of type BOOLEAN.
RDB_PREDICATE_VIOLATION_ERROR
The expression specified by constrp is not satisfied.
The call may also fail for a system error, in which case the transaction may be implicitly rolled back.

int RDB_drop_constraint ( const char *  name,
RDB_exec_context *  ecp,
RDB_transaction *  txp 
)

RDB_drop_constraint deletes the constraint with the name name.

Returns:
RDB_OK on success, RDB_ERROR if an error occurred.
Errors:
RDB_NO_RUNNING_TX_ERROR
txp does not point to a running transaction.
RDB_NOT_FOUND_ERROR
A constraint with the name name could not be found.
The call may also fail for a system error, in which case the transaction may be implicitly rolled back.


Generated on Tue Mar 11 23:48:15 2008 for Duro by  doxygen 1.5.1