#include "in_memory_structs.h"
#include "in_memory_cat.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int32_t main_in_memoryTutorial (int32_t argc, const char *const *argv)
{
{
{
{
{
}
{
{
db, tables,
RDM_LEN (tables), NULL, 0, NULL);
{
INFO infoInsert;
strcpy (
infoInsert.mychar, "I'm running in memory!");
db, TABLE_INFO, &infoInsert,
sizeof (infoInsert), NULL);
{
}
else
{
}
}
db, tables,
RDM_LEN (tables), NULL);
{
{
{
INFO infoRead;
cursor, &infoRead, sizeof (infoRead),
NULL);
{
printf ("%s\n\n", infoRead.mychar);
}
else
{
fprintf (
stderr,
"Sorry, I can't read the first "
"info row.");
}
}
}
}
}
else
{
fprintf (
stderr,
"Sorry, I can't open the in_memory database.");
}
}
}
}
}
{
printf (
"There was an error in this Tutorial (%s - %s)\n",
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}