33b6fd1ac519b70e12f061ac052e50253e00aae7
jcasper
  Wed Oct 17 16:59:53 2018 -0700
Adding rqlToSql library to convert RQL into SQL statements, no ticket

diff --git src/inc/rqlToSql.h src/inc/rqlToSql.h
new file mode 100644
index 0000000..5a705ce
--- /dev/null
+++ src/inc/rqlToSql.h
@@ -0,0 +1,19 @@
+/* rqlToSql.h - translation from parsed RQL (Ra Query Language - similar in syntax to SQL)
+ * statements into SQL statements. */
+
+#ifndef RQLTOSQL_H
+#define RQLTOSQL_H
+
+#include "rql.h"
+
+char *rqlStatementToSql (struct rqlStatement *rql, struct slName *allFields);
+/* Convert an rqlStatement into an equivalent SQL statement.  This requires a list
+ * of all fields available, as RQL select statements can include wildcards in the field
+ * list (e.g., 'select abc* from table' retrieves all fields whose names begin with abc). */
+
+char *rqlParseToSqlWhereClause (struct rqlParse *p, boolean inComparison);
+/* Convert an rqlParse into an equivalent SQL where clause (without the "where").
+ * The RQL construction of just naming a field is converted to a SQL "is not NULL".
+ * Leaks memory from a series of constructed and discarded strings. */
+
+#endif /* RQLTOSQL_H */