Truxton jurisdiction set id
Jump to navigation
Jump to search
This sets the 64-bit integer to use as the identifier for the jurisdictio.
This corresponds to the [ID] column of the [Jurisdiction] table.
Syntax
void truxton_jurisdiction_set_id( uint64_t jurisdiction_handle, uint64_t id );
Parameters
jurisdiction_handle
This handle comes from calling truxton_jurisdiction_create().
id
An integer to represent the jurisdiction.
Remarks
If you do not set the id value, a hash of the name of the jurisdiction will be used.
Sample
void create_jurisdiction( void )
{
uint64_t truxton = truxton_create();
uint64_t jurisdiction = truxton_jurisdiction_create( truxton );
truxton_jurisdiction_set_id( jurisdiction, 1234567 );
truxton_jurisdiction_set_name( jurisdiction, "Rubicon" );
truxton_jurisdiction_set_description( jurisdiction, "Will Travers is the POC" );
if ( truxton_jurisdiction_save( jurisdiction ) == 0 )
{
printf( "Cannot save jurisdiction to the database.\n" );
}
truxton_jurisdiction_destroy( jurisdiction );
truxton_destroy( truxton );
}