Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
A datatype for storing a clause used to query a database. More...
#include <sql_clause.h>
Public Member Functions | |
SQLClause * | AllocateSQLClause (const char *key_s, const char *op_s, const char *value_s) |
Allocate a SQLClause. More... | |
void | FreeSQLClause (SQLClause *clause_p) |
Free a SQLClause. More... | |
bool | AddSQLClauseToByteBuffer (const SQLClause *clause_p, ByteBuffer *buffer_p) |
Add the string representing a SQLClause to a ByteBuffer to be used as a query. More... | |
bool | AddSQLClausesToByteBuffer (LinkedList *clauses_p, ByteBuffer *buffer_p) |
Add the strings representing each of the SQLClauses stored on a LinkedList of SQLClauseNodes to a ByteBuffer to be used as a query. More... | |
Data Fields | |
char * | sqlc_key_s |
The key to use. More... | |
char * | sqlc_op_s |
The operator such as =, like, <, etc. More... | |
char * | sqlc_value_s |
The value to use in the query. More... | |
A datatype for storing a clause used to query a database.
Examples such as "foo=bar" would become
sqlc_key_s = "foo" sqlc_op_s = "=" sqlc_value_s = "bar"
and "band like spina%" would become
sqlc_key_s = "band" sqlc_op_s = "like" sqlc_value_s = "spina%"
SQLClause * AllocateSQLClause | ( | const char * | key_s, |
const char * | op_s, | ||
const char * | value_s | ||
) |
void FreeSQLClause | ( | SQLClause * | clause_p | ) |
bool AddSQLClauseToByteBuffer | ( | const SQLClause * | clause_p, |
ByteBuffer * | buffer_p | ||
) |
Add the string representing a SQLClause to a ByteBuffer to be used as a query.
clause_p | The SQLClause. |
buffer_p | The ByteBuffer to print the SQLClause to. |
true
if the SQLClause was printed successfully to the ByteBuffer, false
otherwise bool AddSQLClausesToByteBuffer | ( | LinkedList * | clauses_p, |
ByteBuffer * | buffer_p | ||
) |
Add the strings representing each of the SQLClauses stored on a LinkedList of SQLClauseNodes to a ByteBuffer to be used as a query.
clauses_p | The LinkedList of SQLClauseNodes. |
buffer_p | The ByteBuffer to print the SQLClause to. |
true
if the all SQLClauses on the list was printed successfully to the ByteBuffer, false
otherwise char* sqlc_key_s |
The key to use.
char* sqlc_op_s |
The operator such as =, like, <, etc.
char* sqlc_value_s |
The value to use in the query.