select

Starts a builder struct that can be used to SELECT (query) data from the database.

It's possible to query full Model instances (get all fields), which are allocated by the GC. It's also possible to only query parts of a Model, for which DormPatch types are used, which is useful for improved query performance when only using parts of a Model as well as reusing the data in later update calls. (if the primary key is included in the patch)

See SelectOperation for possible conditions and how to extract data.

This method can also be used on transactions.

  1. SelectOperation!(DBType!(Selection), SelectType!(Selection)) select(DormDB db)
    static @trusted
    SelectOperation!(DBType!(Selection), SelectType!(Selection))
    select
    (
    Selection...
    )
    (
    return ref const DormDB db
    )
  2. SelectOperation!(DBType!(Selection), SelectType!(Selection)) select(DormTransaction tx)

Meta