mirror of https://git.kore.io/kore.git
Add kore_pgsql_getlength() which will return length of a column.
This commit is contained in:
parent
3b09683f5c
commit
e1be630b84
|
@ -56,6 +56,7 @@ int kore_pgsql_ntuples(struct kore_pgsql *);
|
|||
void kore_pgsql_logerror(struct kore_pgsql *);
|
||||
void kore_pgsql_queue_remove(struct http_request *);
|
||||
char *kore_pgsql_getvalue(struct kore_pgsql *, int, int);
|
||||
int kore_pgsql_getlength(struct kore_pgsql *, int, int);
|
||||
|
||||
#define KORE_PGSQL_STATE_INIT 1
|
||||
#define KORE_PGSQL_STATE_WAIT 2
|
||||
|
|
|
@ -228,6 +228,12 @@ kore_pgsql_ntuples(struct kore_pgsql *pgsql)
|
|||
return (PQntuples(pgsql->result));
|
||||
}
|
||||
|
||||
int
|
||||
kore_pgsql_getlength(struct kore_pgsql *pgsql, int row, int col)
|
||||
{
|
||||
return (PQgetlength(pgsql->result, row, col));
|
||||
}
|
||||
|
||||
char *
|
||||
kore_pgsql_getvalue(struct kore_pgsql *pgsql, int row, int col)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue