anchor.diff:  }
   -------------------------------------------------------------------------------------------------------
   
  -After this you can inject `Database` normally in your beans.
  -
  -Guice-integration
  -~~~~~~~~~~~~~~~~~
  -
  -Dalesbred has support for integration with Guice 3. You can just pass in `DataSourceDatabaseModule`
  -or `DriverManagerDatabaseModule` when constructing your injector and you'll get automatic support
  -for annotation based transactions and can @Inject your database wherever you need it.
  +After this you can inject {javadocBase}fi/evident/dalesbred/Database.html[Database] normally in your beans.
  +
  +Guice
  +~~~~~
  +
  +Dalesbred has support for integration with https://code.google.com/p/google-guice/[Guice 3]. You can just pass in
  +{javadocBase}fi/evident/dalesbred/support/guice/DataSourceDatabaseModule.html[DataSourceDatabaseModule]
  +or {javadocBase}fi/evident/dalesbred/support/guice/DriverManagerDatabaseModule.html[DriverManagerDatabaseModule]
  +when constructing your injector and you'll get automatic support for annotation based transactions and can
  +@Inject your database wherever you need it.
   
   [source,java]
   -------------------------------------------------------------------------------------------------------
  
positive.code: }
  -------------------------------------------------------------------------------------------------------
  
  Note that the returned `InputStream` or `Reader` is only valid for the duration of the active transaction.
  
  Confidential values
  ~~~~~~~~~~~~~~~~~~~
  
negative.code: [source,java]
  int id = db.findUniqueInt("insert into department (name) values ('foo') returning id");
  
  Queries
  -------
  
  SqlQuery vs. query parameters
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  All methods come in two variants: there's an implementation that takes
  an {javadocBase}fi/evident/dalesbred/SqlQuery.html[SqlQuery] as a parameter and there's another
  implementation that takes {jdkJavadocBase}java/lang/String.html[String] and variable arguments of parameters.
  The latter is just convenience method for the further, meaning that the following code fragments are
  identical in functionality:
  
  [source,java]
  -------------------------------------------------------------------------------------------------------
  import static fi.evident.dalesbred.SqlQuery.query;
  
  SqlQuery query = query("select id, name from department where update_timestamp > ?", date);
  db.findAll(Department.class, query);
  
  db.findAll(Department.class,
      "select id, name from department where update_timestamp > ?", date);
  -------------------------------------------------------------------------------------------------------
  
  Normally you want to use the latter form, but every once in a while it's
  useful to be able to pass the query around with its parameters. In those
  cases you'd want to use the first form. An example is when you build
  the query dynamically:
  
  [source,java]
  db.findAll(Department.class, buildDepartmentQuery(form));
  
  Named queries
  ~~~~~~~~~~~~~
  
  In addition to using positional parameters in your SQL statements, you can also you named parameters:
  
  [source,java]
  -------------------------------------------------------------------------------------------------------
  import static fi.evident.dalesbred.SqlQuery.namedQuery;
  
  Map<String,Object> values = new HashMap<String,Object>();
  values.put("firstName", "John");
  values.put("lastName", "Doe");
  
  SqlQuery query = namedQuery("select id from employee where first_name = :firstName and last_name = :lastName", values);
  db.findAll(Department.class, query);
  -------------------------------------------------------------------------------------------------------
  
  Instead of {jdkJavadocBase}java/util/Map.html[Map]s, you can also pass just regular objects to `namedQuery` as
  the source of values. The parameter names are mapped to properties or fields of the objects. Finally, if you want
  detailed control, you can pass your own implementation of
  {javadocBase}fi/evident/dalesbred/query/VariableResolver.html[VariableResolver] to resolve the variables.
  
  Building queries dynamically
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  At the moment there's no high-level API for building queries, but there is a
  {javadocBase}fi/evident/dalesbred/query/QueryBuilder.html[QueryBuilder] that
  is basically just a {jdkJavadocBase}java/util/StringBuilder.html[StringBuilder] which remembers
  the query-parameters, so you can say things like:
  
  [source,java]
  -------------------------------------------------------------------------------------------------------
  QueryBuilder qb = new QueryBuilder("select id, name, status from document");
  if (status != null)
      qb.append(" where status=?", status);
  
  db.findAll(Document.class, qb.build());
  -------------------------------------------------------------------------------------------------------
  
  For all but simplest dynamic queries, you'll probably want to have a higher level API that understands
  the structure of the SQL.
  
  Transactions
  ------------
  
  Transaction callbacks
  ~~~~~~~~~~~~~~~~~~~~~
  
  To perform a bunch of operations in transaction, use {javadocBase}fi/evident/dalesbred/TransactionCallback.html[TransactionCallback]
  or {javadocBase}fi/evident/dalesbred/VoidTransactionCallback.html[VoidTransactionCallback]:
  
  [source,java]
  -------------------------------------------------------------------------------------------------------
  