Initial commit
This commit is contained in:
73
application/target/sqlite.h
Normal file
73
application/target/sqlite.h
Normal file
@@ -0,0 +1,73 @@
|
||||
#ifndef _sqlite
|
||||
|
||||
#define _sqlite
|
||||
|
||||
|
||||
// Macros
|
||||
|
||||
|
||||
|
||||
#include "stdlib.h"
|
||||
|
||||
extern char * __ClassNames[];
|
||||
|
||||
|
||||
// Includes
|
||||
|
||||
#include "console.h"
|
||||
|
||||
#include <text.h>
|
||||
|
||||
#include <array.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <classConfiguration.h>
|
||||
|
||||
|
||||
typedef struct sqlite{
|
||||
|
||||
unsigned short __classIndex;
|
||||
|
||||
sqlite3 * db;
|
||||
|
||||
sqlite3_stmt * res;
|
||||
|
||||
char * value;
|
||||
|
||||
char * selectedModel;
|
||||
|
||||
|
||||
} sqlite;
|
||||
|
||||
void sqlite_constructor( sqlite * this, char * filePath );
|
||||
|
||||
void sqlite_connect( sqlite * this, char * filePath );
|
||||
|
||||
void sqlite_free( sqlite * this );
|
||||
|
||||
void sqlite_selectModel( sqlite * this, char * className );
|
||||
|
||||
void sqlite_createTable( sqlite * this );
|
||||
|
||||
void sqlite_addRows( sqlite * this, array * insertArray );
|
||||
|
||||
void sqlite_updateRow( sqlite * this, sqlite3_stmt * result, int propertyCount, char * * propertyNames, int * propertyOffsets, int * datatypeIndices, char * pointer );
|
||||
|
||||
void sqlite_update( sqlite * this, void * row );
|
||||
|
||||
void sqlite_addRow( sqlite * this, void * row );
|
||||
|
||||
struct array * sqlite_fetchRows( sqlite * this, char * sql );
|
||||
|
||||
sqlite sqlite_new( char * filePath );
|
||||
|
||||
sqlite * sqlite_newPointer( char * filePath );
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user