Truxton update investigation type

From truxwiki.com
Jump to navigation Jump to search

Sets the type of an existing investigation. This corresponds to the [InvestigationTypeID] column of the [Investigation] table. It should contain a value from the [ID] column of the [InvestigationType] table or a defined constant.

Syntax

int truxton_update_investigation_type( uint64_t truxton_handle, char const * investigation_id, uint64_t investigation_type );

Parameters

truxton_handle

The Truxton instance that contains this investigation. This handle comes from calling truxton_create().

investigation_id

The string representation of the GUID of the investigation to modify. It should match the value in the [ID] column of a record in the [Investigation] table.

investigation_type

The type of the investigation. This should be a value from the [ID] column from the [InvestigationType] table or a defined constant.

Return value

A non-zero value on success, zero on failure.

Sample

void it_is_a_murder( char const * investigation_id )
{
   uint64_t truxton = truxton_create();

   if ( truxton_update_investigation_type( truxton, investigation_id, INVESTIGATION_TYPE_HOMICIDE ) == 0 )
   {
      printf( "Cannot update the investigation type.\n" );
   }

   truxton_destroy( truxton );
}