i wanted ask if had problems scriptdb type equivalences last week. on 10 july when performing queries numeric values, query numeric value returning proper results. in documentation said that:
what means if have object numeric value, can query upon string version of same. example, if store object {a: 23}, can query on {a: "23"} , scriptdb find previous object.
but latter version of query string parameter returning nothing. seems ok, both versions work expected.
has noticed same problem recently?
there logged issue related indexing , resolving of searching integer values on day note.
there resolution proposed in issue tracker.
https://code.google.com/p/google-apps-script-issues/issues/detail?id=2999
thanks patience; believe underlying issue resolved. however, have not retroactively fixed data may have saved or resaved on last 2 days. data saved during period stored safely, queries objects still fail if data type not match exactly. example, property {id: 4074} match {id: 4074} (number), not {id: '4074'} (string) or {id: true} (boolean test).
if need query data last 2 days without data type matching exactly, need resave records retrieve them scriptdb , rewriting them in place, using sample function below:
function resaverecords() { var db = scriptdb.getmydb(); var records = db.query({}); // records while (records.hasnext()) { // loop through records var item = records.next(); db.save(item); // resave same scriptdb id } }
Comments
Post a Comment