Package io.inversion.query
Class Query<T extends Query,D extends Db,S extends Select,F extends From,W extends Where,R extends Group,O extends Order,G extends Page>
- java.lang.Object
-
- io.inversion.query.Builder<T,T>
-
- io.inversion.query.Query<T,D,S,F,W,R,O,G>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<io.inversion.utils.KeyValue>castValuesprotected Collectioncollectionprotected Ddbprotected booleandryRunprotected Ffromprotected Rgroupprotected Oorderprotected java.util.List<io.inversion.utils.KeyValue>originalValuesprotected Gpageprotected Sselectprotected Wwhere
-
Constructor Summary
Constructors Constructor Description Query()Query(D db, Collection coll)Query(D db, Collection coll, java.lang.Object terms, java.lang.String... functions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TclearValues()protected FcreateFrom()protected RcreateGroup()protected OcreateOrder()protected GcreatePage()protected ScreateSelect()protected WcreateWhere()ResultsdoSelect()java.util.List<Builder>getBuilders()CollectiongetCollection()io.inversion.utils.KeyValue<java.lang.String,java.lang.String>getColValue(int index)java.util.List<java.lang.String>getColValueKeys()java.util.List<java.lang.Object>getColValues()DgetDb()FgetFrom()RgetGroup()intgetNumValues()OgetOrder()java.util.List<java.lang.Object>getOriginalValues()GgetPage()SgetSelect()java.util.List<io.inversion.utils.KeyValue>getValues()WgetWhere()booleanisDryRun()Test if this query sould actually be run or just planned.TwithCollection(Collection coll)protected TwithColValue(java.lang.String columnName, java.lang.Object value)TwithDb(D db)TwithDryRun(boolean dryRun)TwithTerm(io.inversion.rql.Term term)OVERRIDE ME TO ADD CUSTOM FUNCTIONALITY TO YOUR FLUENT API-
Methods inherited from class io.inversion.query.Builder
addTerm, clearFunctions, find, find, findAll, findAll, findInt, findTerm, getParent, getRoot, getTerms, isFunction, parse, r, removeBuilder, toString, toString, withBuilder, withFunctions, withFunctions, withParent, withTerm, withTerm, withTerms
-
-
-
-
Field Detail
-
castValues
protected final java.util.List<io.inversion.utils.KeyValue> castValues
-
originalValues
protected final java.util.List<io.inversion.utils.KeyValue> originalValues
-
collection
protected Collection collection
-
dryRun
protected boolean dryRun
-
-
Constructor Detail
-
Query
public Query()
-
Query
public Query(D db, Collection coll)
-
Query
public Query(D db, Collection coll, java.lang.Object terms, java.lang.String... functions)
-
-
Method Detail
-
createSelect
protected S createSelect()
-
createFrom
protected F createFrom()
-
createWhere
protected W createWhere()
-
createGroup
protected R createGroup()
-
createOrder
protected O createOrder()
-
createPage
protected G createPage()
-
withTerm
public T withTerm(io.inversion.rql.Term term)
Description copied from class:BuilderOVERRIDE ME TO ADD CUSTOM FUNCTIONALITY TO YOUR FLUENT API
-
doSelect
public Results doSelect() throws ApiException
- Throws:
ApiException
-
getBuilders
public java.util.List<Builder> getBuilders()
-
getSelect
public S getSelect()
-
getFrom
public F getFrom()
-
getWhere
public W getWhere()
-
getGroup
public R getGroup()
-
getOrder
public O getOrder()
-
getPage
public G getPage()
-
getCollection
public Collection getCollection()
-
getDb
public D getDb()
-
withCollection
public T withCollection(Collection coll)
-
getNumValues
public int getNumValues()
-
clearValues
protected T clearValues()
-
withColValue
protected T withColValue(java.lang.String columnName, java.lang.Object value)
-
getColValueKeys
public java.util.List<java.lang.String> getColValueKeys()
-
getColValues
public java.util.List<java.lang.Object> getColValues()
-
getOriginalValues
public java.util.List<java.lang.Object> getOriginalValues()
-
getColValue
public io.inversion.utils.KeyValue<java.lang.String,java.lang.String> getColValue(int index)
-
getValues
public java.util.List<io.inversion.utils.KeyValue> getValues()
-
isDryRun
public boolean isDryRun()
Test if this query sould actually be run or just planned.- Returns:
- true if dryRun is true or db.isDryRun is true
-
withDryRun
public T withDryRun(boolean dryRun)
-
-