Difference between revisions of "Truxton jurisdiction save"
Jump to navigation
Jump to search
(Created page with "This saves a jurisdiction object to the <code>[Jurisdiction]</code> table. =Syntax= <source lang="C"> int truxton_jurisdiction_save( uint64_t jurisdiction_handle ); </source>...") |
|||
| Line 7: | Line 7: | ||
=Parameters= | =Parameters= | ||
| − | ==<code>jurisdiction_handle </code>== | + | ==<code>jurisdiction_handle</code>== |
This handle comes from calling <code>[[truxton_jurisdiction_create|truxton_jurisdiction_create()]]</code>. | This handle comes from calling <code>[[truxton_jurisdiction_create|truxton_jurisdiction_create()]]</code>. | ||
Latest revision as of 15:46, 18 February 2021
This saves a jurisdiction object to the [Jurisdiction] table.
Syntax
int truxton_jurisdiction_save( uint64_t jurisdiction_handle );
Parameters
jurisdiction_handle
This handle comes from calling truxton_jurisdiction_create().
Return value
A non-zero value on success, zero on failure.
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 );
}