![JAR search and dependency download from the Maven repository](/logo.png)
com.rethinkdb.ast.query.RqlUtil Maven / Gradle / Ivy
The newest version!
package com.rethinkdb.ast.query;
import com.rethinkdb.RethinkDB;
import com.rethinkdb.RethinkDBException;
import com.rethinkdb.ast.query.gen.*;
import com.rethinkdb.model.RqlFunction;
import com.rethinkdb.ast.query.RqlQuery;
import com.rethinkdb.model.RqlLambda;
import com.rethinkdb.proto.Q2L;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import java.lang.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Date;
import java.util.Map;
public class RqlUtil {
/**
* Coerces objects from their native type to RqlQuery
* @param val val
* @return RqlQuery
*/
public static RqlQuery toRqlQuery(java.lang.Object val) {
return toRqlQuery(val, 20);
}
private static RqlQuery toRqlQuery(java.lang.Object val, int remainingDepth) {
if (val instanceof RqlQuery) {
return (RqlQuery)val;
}
if (val instanceof List) {
List innerValues = new ArrayList();
for (java.lang.Object innerValue : (List) val) {
innerValues.add(toRqlQuery(innerValue, remainingDepth - 1));
}
return new MakeArray(innerValues, null);
}
if (val instanceof Map) {
Map obj = new HashMap();
for (Map.Entry
© 2015 - 2025 Weber Informatics LLC | Privacy Policy