EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
Macros | Functions
sqliteu.c File Reference

File containing the implementation of the sqlite utilities. More...

#include <stdio.h>
#include <stdlib.h>
#include <sqlite3.h>
#include <string.h>
#include "../utils/log.h"
Include dependency graph for sqliteu.c:

Macros

#define SQLITE_EXEC_TRIES   10000
 

Functions

int execute_sqlite_query (sqlite3 *db, const char *statement)
 Executes and sqlite query statement. More...
 
int check_table_exists (sqlite3 *db, const char *table_name)
 Check if sqlite table exists. More...
 

Detailed Description

File containing the implementation of the sqlite utilities.

Author
Alexandru Mereacre
Date
2021

Macro Definition Documentation

◆ SQLITE_EXEC_TRIES

#define SQLITE_EXEC_TRIES   10000

Function Documentation

◆ check_table_exists()

int check_table_exists ( sqlite3 *  db,
const char *  table_name 
)

Check if sqlite table exists.

Parameters
dbThe sqlite db structure
table_nameThe table name
Returns
int 0 if it doesn't exist, 1 if it excists and -1 on failure

◆ execute_sqlite_query()

int execute_sqlite_query ( sqlite3 *  db,
const char *  statement 
)

Executes and sqlite query statement.

Parameters
dbThe sqlite db structure.
statementThe sqlite query statement.
Returns
int 0 on success, -1 on failure.