b3a34c696d317da9ab87bd11f71e979181bd638c kent Mon Oct 8 15:52:31 2018 -0700 Adding support for + - * / as mathematical binary expressions. Also making fields with undefined values act as zeroes when an integer is expected. Also making from, where, and, or etc. not case sensitive. diff --git src/inc/rql.h src/inc/rql.h index 76a5e0e..f67774a 100644 --- src/inc/rql.h +++ src/inc/rql.h @@ -34,30 +34,36 @@ rqlOpGe, /* Greater than or equals comparison. */ rqlOpLe, /* Less than or equals comparison. */ rqlOpLike, /* SQL wildcard compare. */ /* Logic ops. */ rqlOpAnd, /* An and */ rqlOpOr, /* An or */ rqlOpNot, /* A unary not. */ /* Leading minus. */ rqlOpUnaryMinusInt, rqlOpUnaryMinusDouble, /* Fancy ops to fetch sub-parts. */ rqlOpArrayIx, /* An array with an index. */ + + /* Binary mathematical operations. */ + rqlOpAdd, + rqlOpSubtract, + rqlOpMultiply, + rqlOpDivide, }; char *rqlOpToString(enum rqlOp op); /* Return string representation of parse op. */ enum rqlType /* A type */ { rqlTypeBoolean = 1, rqlTypeString = 2, rqlTypeInt = 3, rqlTypeDouble = 4, }; union rqlVal