def _render_condition_value(value, field_type):

    # BigQuery cannot cast strings to booleans, convert to ints
    if field_type == "BOOLEAN":
        value = 1 if value else 0
    elif field_type in ("STRING", "INTEGER", "FLOAT"):
        value = "'%s'" % (value)
    elif field_type in ("TIMESTAMP"):
        value = "'%s'" % (str(value))
    return "%s(%s)" % (field_type, value)
Extract the minimal set of information for query matching.
dataset/ETHPy150Open tylertreat/BigQuery-Python/bigquery/query_builder.py/_render_condition_value--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/datastore/old_datastore_stub_util.py/ListCursor._MinimalQueryInfo