Skip to content
Permalink
Browse files

Fix docs TOC depth

Conflicts:
	src/sphinx/connection.rst
	src/sphinx/introduction.rst
  • Loading branch information
cvogt committed May 27, 2014
1 parent de9c9d3 commit 69abcae290eb621fc46fb32a8bb8750342717341
Showing with 15 additions and 13 deletions.
  1. +9 −9 src/sphinx/connection.rst
  2. +1 −1 src/sphinx/index.rst
  3. +5 −3 src/sphinx/introduction.rst
@@ -23,7 +23,7 @@ connection data you have available.
Using a JDBC URL
^^^^^^^^^^^^^^^^^^^^
________________

You can provide a JDBC URL to
:api:`forURL <scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef@forURL(String,String,String,Properties,String):DatabaseDef>`.
@@ -38,7 +38,7 @@ specific).
.. TODO: mention that you have to import a matching driver
Using a DataSource
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
__________________

You can provide a :javaapi:`DataSource <javax/sql/DataSource>` object to
:api:`forDataSource <scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef@forDataSource(DataSource):DatabaseDef>`.
@@ -52,7 +52,7 @@ acquired from the pool and when the Session is closed it is returned to the
pool.

Using a JNDI Name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_________________

If you are using :wikipedia:`JNDI` you can provide a JNDI name to
:api:`forName <scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef@forName(String):DatabaseDef>`
@@ -73,7 +73,7 @@ and you can use it to open database connections, which Slick encapsulates in
.. _session-scope:

Automatically closing Session scope
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
___________________________________

The :api:`Database <scala.slick.jdbc.JdbcBackend@Database:Database>` object's
:api:`withSession <scala.slick.jdbc.JdbcBackend$DatabaseDef@withSession[T]((Session)⇒T):T>`
@@ -110,7 +110,7 @@ scope for example), by assigning the session to a var, by returning the session
as the return value of the withSession scope or else.

Implicit Session
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
________________

By marking the :api:`Session <scala.slick.jdbc.JdbcBackend$SessionDef>` as implicit you can avoid
having to pass it to the executing methods explicitly.
@@ -122,7 +122,7 @@ This is optional of course. Use it if you think it makes your code cleaner.
.. _transactions:

Transactions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
____________

You can use the :api:`Session <scala.slick.jdbc.JdbcBackend$SessionDef>` object's
:api:`withTransaction <scala.slick.jdbc.JdbcBackend$SessionDef@withTransaction[T](⇒T):T>`
@@ -143,15 +143,15 @@ method as a shortcut.
.. includecode:: code/Connection.scala#independentTransaction

Manual Session handling
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_______________________

This is not recommended, but if you have to, you can handle the lifetime of a
:api:`Session <scala.slick.jdbc.JdbcBackend$SessionDef>` manually.

.. includecode:: code/Connection.scala#manual-session

Passing sessions around
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_______________________

You can write re-useable functions to help with Slick queries. They mostly do
not need a :api:`Session <scala.slick.jdbc.JdbcBackend$SessionDef>` as they just produce query
@@ -164,7 +164,7 @@ reduce boilerplate code:
.. includecode:: code/Connection.scala#helpers

Dynamically scoped sessions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
___________________________

You usually do not want to keep sessions open for very long but open and close
them quickly when needed. As shown above you may use a
@@ -4,7 +4,7 @@ Slick - Scala Language Integrated Connection Kit
You can find the API documentation `here <api/>`_.

.. toctree::
:maxdepth: 4
:maxdepth: 3

introduction
gettingstarted
@@ -1,5 +1,7 @@
:tocdepth: 2

.. index:: introduction

Introduction
############

@@ -25,7 +27,7 @@ Features
--------

Scala
^^^^^
_____
* Queries, Table & Column Mappings, and types are plain Scala

.. includecode:: code/GettingStartedOverview.scala#quick-schema
@@ -35,14 +37,14 @@ Scala
.. includecode:: code/GettingStartedOverview.scala#features-scala-collections

Type Safe
^^^^^^^^^
_________
* Let your IDE help you write your code
* Find problems at compile-time instead of at runtime

.. includecode:: code/GettingStartedOverview.scala#features-type-safe

Composable
^^^^^^^^^^
__________
* Queries are functions that can be composed and reused

.. includecode:: code/GettingStartedOverview.scala#features-composable

0 comments on commit 69abcae

Please sign in to comment.
You can’t perform that action at this time.