Subzero C Shared Library
Loading...
Searching...
No Matches
subzero.h
Go to the documentation of this file.
1
116#include <stdarg.h>
117#include <stdbool.h>
118#include <stdint.h>
119#include <stdlib.h>
120
125
131
136
151
184 const char *uri,
185 const char *body,
186 const char *const *headers,
187 int headers_count,
188 const char *const *env,
189 int env_count);
190
221struct sbz_HTTPRequest *sbz_http_request_new(const char *method,
222 const char *uri,
223 const char *body,
224 const char *const *headers,
225 int headers_count,
226 const char *const *env,
227 int env_count);
228
238
312 const char *path_prefix,
313 const char *role,
314 const struct sbz_DbSchema *db_schema,
315 const struct sbz_HTTPRequest *request,
316 const char *max_rows);
317
328const struct sbz_Statement *sbz_two_stage_statement_mutate(const struct sbz_TwoStageStatement *two_stage_statement);
329
344const struct sbz_Statement *sbz_two_stage_statement_select(const struct sbz_TwoStageStatement *two_stage_statement);
345
366 const char *const *ids,
367 int ids_count);
368
377void sbz_two_stage_statement_free(struct sbz_TwoStageStatement *two_stage_statement);
378
438struct sbz_Statement *sbz_statement_main_new(const char *schema_name,
439 const char *path_prefix,
440 const char *role,
441 const struct sbz_DbSchema *db_schema,
442 const struct sbz_HTTPRequest *request,
443 const char *max_rows);
444
455struct sbz_Statement *sbz_statement_env_new(const struct sbz_DbSchema *db_schema,
456 const struct sbz_HTTPRequest *request);
457
469const char *sbz_statement_sql(const struct sbz_Statement *statement);
470
482const char *const *sbz_statement_params(const struct sbz_Statement *statement);
483
497const char *const *sbz_statement_params_types(const struct sbz_Statement *statement);
498
510int sbz_statement_params_count(const struct sbz_Statement *statement);
511
520void sbz_statement_free(struct sbz_Statement *statement);
521
529void sbz_db_schema_free(struct sbz_DbSchema *schema);
530
591struct sbz_DbSchema *sbz_db_schema_new(const char *db_type,
592 const char *db_schema_json,
593 const char *license_key);
594
606int sbz_db_schema_is_demo(const struct sbz_DbSchema *db_schema);
607
622char *sbz_introspection_query(const char *db_type,
623 const char *path,
624 const char *custom_relations,
625 const char *custom_permissions);
626
636void sbz_introspection_query_free(char *introspection_query);
637
660int sbz_last_error_message(char *buffer, int length);
661
668
674
const struct sbz_Statement * sbz_two_stage_statement_select(const struct sbz_TwoStageStatement *two_stage_statement)
int sbz_db_schema_is_demo(const struct sbz_DbSchema *db_schema)
struct sbz_Statement * sbz_statement_main_new(const char *schema_name, const char *path_prefix, const char *role, const struct sbz_DbSchema *db_schema, const struct sbz_HTTPRequest *request, const char *max_rows)
struct sbz_DbSchema * sbz_db_schema_new(const char *db_type, const char *db_schema_json, const char *license_key)
const struct sbz_Statement * sbz_two_stage_statement_mutate(const struct sbz_TwoStageStatement *two_stage_statement)
struct sbz_Statement * sbz_statement_env_new(const struct sbz_DbSchema *db_schema, const struct sbz_HTTPRequest *request)
void sbz_clear_last_error(void)
void sbz_statement_free(struct sbz_Statement *statement)
struct sbz_Statement sbz_Statement
Definition subzero.h:135
struct sbz_TwoStageStatement sbz_TwoStageStatement
Definition subzero.h:150
int sbz_last_error_length(void)
const char * sbz_statement_sql(const struct sbz_Statement *statement)
struct sbz_TwoStageStatement * sbz_two_stage_statement_new(const char *schema_name, const char *path_prefix, const char *role, const struct sbz_DbSchema *db_schema, const struct sbz_HTTPRequest *request, const char *max_rows)
struct sbz_DbSchema sbz_DbSchema
Definition subzero.h:124
const char *const * sbz_statement_params(const struct sbz_Statement *statement)
void sbz_two_stage_statement_free(struct sbz_TwoStageStatement *two_stage_statement)
int sbz_last_error_http_status(void)
struct sbz_HTTPRequest sbz_HTTPRequest
Definition subzero.h:130
void sbz_introspection_query_free(char *introspection_query)
struct sbz_HTTPRequest * sbz_http_request_new(const char *method, const char *uri, const char *body, const char *const *headers, int headers_count, const char *const *env, int env_count)
struct sbz_HTTPRequest * sbz_http_request_new_with_clone(const char *method, const char *uri, const char *body, const char *const *headers, int headers_count, const char *const *env, int env_count)
int sbz_two_stage_statement_set_ids(struct sbz_TwoStageStatement *two_stage_statement, const char *const *ids, int ids_count)
void sbz_db_schema_free(struct sbz_DbSchema *schema)
const char *const * sbz_statement_params_types(const struct sbz_Statement *statement)
int sbz_statement_params_count(const struct sbz_Statement *statement)
int sbz_last_error_message(char *buffer, int length)
char * sbz_introspection_query(const char *db_type, const char *path, const char *custom_relations, const char *custom_permissions)
void sbz_http_request_free(struct sbz_HTTPRequest *request)