mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
Move RSP query hash table inside RSP2SQL
This commit is contained in:
parent
cc0555d986
commit
7e35068d46
@ -38,6 +38,21 @@ options {
|
|||||||
#include "rsp_query.h"
|
#include "rsp_query.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@members {
|
||||||
|
#define RSP_TYPE_STRING 0
|
||||||
|
#define RSP_TYPE_INT 1
|
||||||
|
#define RSP_TYPE_DATE 2
|
||||||
|
|
||||||
|
struct rsp_query_field_map {
|
||||||
|
char *rsp_field;
|
||||||
|
int field_type;
|
||||||
|
/* RSP fields are named after the DB columns - or vice versa */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* gperf static hash, rsp_query.gperf */
|
||||||
|
#include "rsp_query_hash.c"
|
||||||
|
}
|
||||||
|
|
||||||
query returns [ pANTLR3_STRING result ]
|
query returns [ pANTLR3_STRING result ]
|
||||||
: e = expr
|
: e = expr
|
||||||
{
|
{
|
||||||
|
@ -34,10 +34,6 @@
|
|||||||
#include "RSP2SQL.h"
|
#include "RSP2SQL.h"
|
||||||
|
|
||||||
|
|
||||||
/* gperf static hash, rsp_query.gperf */
|
|
||||||
#include "rsp_query_hash.c"
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
rsp_query_parse_sql(const char *rsp_query)
|
rsp_query_parse_sql(const char *rsp_query)
|
||||||
{
|
{
|
||||||
|
@ -2,22 +2,6 @@
|
|||||||
#ifndef __RSP_QUERY_H__
|
#ifndef __RSP_QUERY_H__
|
||||||
#define __RSP_QUERY_H__
|
#define __RSP_QUERY_H__
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#define RSP_TYPE_STRING 0
|
|
||||||
#define RSP_TYPE_INT 1
|
|
||||||
#define RSP_TYPE_DATE 2
|
|
||||||
|
|
||||||
struct rsp_query_field_map {
|
|
||||||
char *rsp_field;
|
|
||||||
int field_type;
|
|
||||||
/* RSP fields are named after the DB columns - or vice versa */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Generated by gperf - keep in sync, don't alter */
|
|
||||||
const struct rsp_query_field_map *
|
|
||||||
rsp_query_field_lookup (register const char *str, register unsigned int len);
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
rsp_query_parse_sql(const char *rsp_query);
|
rsp_query_parse_sql(const char *rsp_query);
|
||||||
|
Loading…
Reference in New Issue
Block a user