#include "duplicate_key_structs.h"
#include "duplicate_key_cat.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
static INFO infoData[] = {
int32_t main_duplicate_keyTutorial (int32_t argc, const char *const *argv)
{
{
{
{
}
{
INFO sInfo;
{
{
printf ("I can't open the unique_key database.");
}
}
{
db, tables,
RDM_LEN (tables), NULL, 0, NULL);
}
{
{
}
else
{
}
}
{
db, tables,
RDM_LEN (tables), NULL, 0, NULL);
}
{
uint32_t ii;
{
db, TABLE_INFO, &infoData[ii], sizeof (INFO), NULL);
{
printf (
"%s is a duplicate record.\n", sInfo.mychar);
}
}
{
}
else
{
}
}
{
}
{
INFO_MYCHAR_KEY keyValue;
strcpy (keyValue.mychar, infoData[3].mychar);
db, KEY_INFO_MYCHAR, &keyValue, sizeof (keyValue),
&cursor);
{
cursor, &sInfo, sizeof (sInfo), NULL);
{
printf (
"Row found doing a key lookup: %s\n",
sInfo.mychar);
}
{
char keyVal[34] = "Jim";
cursor, KEY_INFO_MYCHAR, keyVal,
sizeof (keyVal));
}
{
}
{
cursor, &sInfo, sizeof (sInfo), NULL);
{
printf (
"Row found doing a key scan lookup: %s\n",
sInfo.mychar);
}
}
{
}
}
}
}
}
}
{
printf (
"There was an error in this Tutorial (%s - %s)\n",
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}