org.positronicnet.db

DbQuery

class DbQuery extends ContentQuery[String, Long]

Queries on Databases. Supports the org.positronicnet.orm.ContentQuery API in full, including limit and order.

Linear Supertypes
ContentQuery[String, Long], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. DbQuery
  2. ContentQuery
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DbQuery (source: DbWrapper, tableName: String, orderString: String, whereString: String, whereValues: Array[String], limitString: String)

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def buildContentValues (assigns: (String, ContentValue)*): ContentValues

    Attributes
    protected
    Definition Classes
    ContentQuery
  8. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def conditionKey : (String, Seq[String])

    All conditions on this ContentQuery.

    All conditions on this ContentQuery. Useful to determine when two are equivalent.

    Definition Classes
    ContentQuery
  10. def count : Long

    Returns a count of records matching this query's conditions.

    Returns a count of records matching this query's conditions. May not be supported by all repositories; in particular, it is not supported by ContentProviders.

    Definition Classes
    DbQueryContentQuery
  11. def delete : Int

    Delete all records which match this ContentQuery

    Delete all records which match this ContentQuery

    Definition Classes
    ContentQuery
  12. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  13. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def facility : ThreadlessDatabase

    Definition Classes
    DbQueryContentQuery
  15. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  17. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  18. def insert (assigns: (String, ContentValue)*): Long

    Inserts a new record, with values of the columns named by the Strings to each associated ContentValue.

    Inserts a new record, with values of the columns named by the Strings to each associated ContentValue. E.g.,

        qry.insert( "description" -> "write documentation",
                    "status" -> "in_progress",
                    "urgency_level" -> 3 )
    

    using the same shorthand for pairs as is commonly used for Map constructors.

    Definition Classes
    ContentQuery
  19. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  20. def limit (s: String): DbQuery

    Returns a new query whose results will be limited to the given number of rows.

    Returns a new query whose results will be limited to the given number of rows. May not be supported by all repositories; in particular, it is not supported by ContentProviders.

    Definition Classes
    DbQueryContentQuery
  21. def limit (l: Int): ContentQuery[String, Long]

    Returns a new query whose results will be limited to the given number of rows.

    Returns a new query whose results will be limited to the given number of rows. May not be supported by all repositories; in particular, it is not supported by ContentProviders.

    Definition Classes
    ContentQuery
  22. def log (stmtType: String, contentValues: ContentValues = null, cols: Array[String] = null): AnyVal

    Attributes
    protected
    Definition Classes
    ContentQuery
  23. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  24. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  25. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  26. def oneRow (cols: String*): PositronicCursor

  27. def order (s: String): DbQuery

    Returns a new ContentQuery, equivalent to this one, except that results will be ordered as per the given String.

    Returns a new ContentQuery, equivalent to this one, except that results will be ordered as per the given String. Interpretation of the Strings is as per the underlying APIs, e.g., as for a SQL order by when querying a database.

    Definition Classes
    DbQueryContentQuery
  28. def select (cols: String*): PositronicCursor

    Return a PositronicCursor for the values of the given columns, in records matching this query, respecting its order and limit.

    Return a PositronicCursor for the values of the given columns, in records matching this query, respecting its order and limit.

    (This is a wrapper around standard Android Cursors, which provides a few extra features; its wrappedCursorAs method can be used to get the underlying raw Cursor, if you want it.)

    Definition Classes
    ContentQuery
  29. def selectDefaultColumns : PositronicCursor

    Return a PositronicCursor for the values of the underlying resource's default set of columns, in records matching this query, respecting its order and limit.

    Return a PositronicCursor for the values of the underlying resource's default set of columns, in records matching this query, respecting its order and limit.

    (This is a wrapper around standard Android Cursors, which provides a few extra features; its wrappedCursorAs method can be used to get the underlying raw Cursor, if you want it.)

    Definition Classes
    ContentQuery
  30. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  31. def toString (): String

    Definition Classes
    ContentQuery → AnyRef → Any
  32. def update (assigns: (String, ContentValue)*): Int

    Updates each record matched by the query, setting values of the columns named by the Strings to each associated ContentValue.

    Updates each record matched by the query, setting values of the columns named by the Strings to each associated ContentValue. E.g.,

        qry.update( "status" -> "in_progress",
                    "urgency_level" -> 3 )
    

    using the same shorthand for pairs as is commonly used for Map constructors.

    Definition Classes
    ContentQuery
  33. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  34. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  36. def where (s: String, vals: ContentValue*): DbQuery

    Returns a new ContentQuery with the same semantics as this one, except that it adds extra conditions.

    Returns a new ContentQuery with the same semantics as this one, except that it adds extra conditions. If the condition contains '?' placeholders, they will be replaced with ContentValue arguments, e.g.

        qry = otherQuery.where( "created_at > ? and status = ?",
                                myDate.getTime, "in_progress" )
    
    Definition Classes
    DbQueryContentQuery
  37. def whereEq (pairs: (String, ContentValue)*): DbQuery

    Returns a new ContentQuery with the same semantics as this one, except that it adds the condition that each of the fields named by the Strings in the arguments should be equal to the associated ContentValue.

    Returns a new ContentQuery with the same semantics as this one, except that it adds the condition that each of the fields named by the Strings in the arguments should be equal to the associated ContentValue. E.g.,

        qry = otherQuery.where( "status" -> "in_progress",
                                "urgency_level" -> 3 )
    

    using the same shorthand for pairs as is commonly used for Map constructors.

    Definition Classes
    DbQueryContentQuery
  38. def withUpdatedWhere [T] (pairs: Seq[(String, ContentValue)])(handler: (String, Array[String]) ⇒ T): T

    Attributes
    protected
    Definition Classes
    ContentQuery
  39. def withUpdatedWhere [T] (s: String, arr: Array[ContentValue])(handler: (String, Array[String]) ⇒ T): T

    Attributes
    protected
    Definition Classes
    ContentQuery

Inherited from ContentQuery[String, Long]

Inherited from AnyRef

Inherited from Any