#include <glib.h>
#include <libpq-fe.h>
Go to the source code of this file.
Defines | |
#define | __BEGIN_DECLS |
#define | __END_DECLS |
#define | __P(protos) protos |
#define | SEVR_NUMS "severity_nums" |
#define | STAT_NUMS "status_nums" |
#define | TYPE_NUMS "problem_type_nums" |
#define | SUB_IDS "submitter_ids" |
#define | RESP_IDS "responsible_ids" |
Functions | |
GList * | create_num_list (PGconn *conn, gint query_pk, const gchar *column) |
Create a list of numbers from a PostgreSQL int array field. More... | |
GList * | create_txt_list (PGconn *conn, gint query_pk, const gchar *column) |
Create a list of text entries from a PostgreSQL text array field. More... | |
GString * | create_int_arr_str (GList *list) |
Create an array string from a linked list of integers. More... | |
GString * | create_txt_arr_str (GList *list) |
Create an array string from a linked list of integers. More... |
PRepS has a query table that stores the queries that the user can use to select which items to display. The functions defined here aid in dealing with that table.
Specifically, the query table makes use of PostgreSQL's array feature that allows for arrays of data to be stored in a column. These functions make it easier to access the 'array' columns in the query table.
|
Use in create_txt_list() calls to specify the 'responsible login-ids' column. |
|
Use in create_num_list() calls to specifiy the 'severity numbers' column. |
|
Use in create_num_list() calls to specify the 'status numbers' column. |
|
Use in create_txt_list() calls to specify the 'submitter login-ids' column. |
|
Use in create_num_list() calls to specify the 'problem type numbers' column. |
|
Create an array string from a linked list of integers.
PostgreSQL allows for arrays of values to be stored in a column. This function takes a list of integers and creates a chacter string that represents the array in the format that PostgreSQL expects. This function allocates a new GString. It is the callers responsiblity to destroy the GString (use g_string_free()).
|
|
Create a list of numbers from a PostgreSQL int array field.
PostgreSQL allows for arrays of values to be stored in a column. This function takes the contents of one of those columns and returns its contents as a linked list of integers. Use this function for fields that contain arrays of integers. It is the caller's responsibility to destroy the list.
|
|
Create an array string from a linked list of integers.
PostgreSQL allows for arrays of values to be stored in a column. This function takes a list of strings and creates a chacter string that represents the array in the format that PostgreSQL expects. This function allocates a new GString. It is the callers responsiblity to destroy the GString (use g_string_free()).
|
|
Create a list of text entries from a PostgreSQL text array field.
PostgreSQL allows for arrays of values to be stored in a column. This function takes the contents of one of those columns and returns its contents as a linked list of integers. Use this function for fields that contain arrays of text. This function g_malloc's gchar arrays and places them in a list. It is the caller's responsibility to properly g_free the gchar buffers, and destroy the list.
|