When inserting a literal value into a SELECT statement:
whenever possible, leave the value unquoted if it is known to be
numeric, i.e. it is carried as a JSON_NUMBER, regardless of the
datatype as inferred from the associated column. Reason: so that
the test_json_query utility (which currently doesn't look up the
datatypes of the columns) can generate the correct SQL most of
the time. This approach should also be slightly faster, since it
bypasses some hashed lookups.
2. As part of the implementation of the change described above:
combine searchSimplePredicate() and searchWriteSimplePredicate()
into a single function, so that the JSON type is known when it's
time do decide whether to add quotes. This change is benign because
the latter function was called only by the former anyway.
3. Several minor rearrangements and optimizations.
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12487
dcc99617-32d9-48b4-a31d-
7c20da2025e4