Skip to content

Added Microsoft SQL Server Example to PDO session storage documentation #1926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/dependency_injection/compilation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ worlds though by using configuration files and then dumping and caching the resu
configuration. The ``PhpDumper`` makes dumping the compiled container easy::

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Dumper\PhpDumper
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;

$file = __DIR__ .'/cache/container.php';

Expand Down
17 changes: 17 additions & 0 deletions cookbook/configuration/pdo_session_storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,20 @@ For PostgreSQL, the statement should look like this:
session_time integer NOT NULL,
CONSTRAINT session_pkey PRIMARY KEY (session_id)
);

Microsoft SQL Server
~~~~~~~~~~

For MSSQL, the statement might look like the following:

.. code-block:: sql

CREATE TABLE [dbo].[session](
[session_id] [nvarchar](255) NOT NULL,
[session_value] [ntext] NOT NULL,
[session_time] [int] NOT NULL,
PRIMARY KEY CLUSTERED
(
[session_id] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A code block should be indented 4 spaces, not 2 or 3. I prefer to use the 72 characters break on code blocks to, can you split line 200 into multiple lines?

17 changes: 8 additions & 9 deletions reference/configuration/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,10 @@ can control. The following configuration options exist for a mapping:
Doctrine DBAL Configuration
---------------------------

.. note::

DoctrineBundle supports all parameters that default Doctrine drivers
accept, converted to the XML or YAML naming standards that Symfony
enforces. See the Doctrine `DBAL documentation`_ for more information.

Besides default Doctrine options, there are some Symfony-related ones that you
can configure. The following block shows all possible configuration keys:
DoctrineBundle supports all parameters that default Doctrine drivers
accept, converted to the XML or YAML naming standards that Symfony
enforces. See the Doctrine `DBAL documentation`_ for more information.
The following block shows all possible configuration keys:

.. configuration-block::

Expand All @@ -233,12 +229,15 @@ can configure. The following block shows all possible configuration keys:
user: user
password: secret
driver: pdo_mysql
# the DBAL driverClass option
driver_class: MyNamespace\MyDriverImpl
# the DBAL driverOptions option
options:
foo: bar
path: "%kernel.data_dir%/data.sqlite"
memory: true
unix_socket: /tmp/mysql.sock
# the DBAL wrapperClass option
wrapper_class: MyDoctrineDbalConnectionWrapper
charset: UTF8
logging: "%kernel.debug%"
Expand Down Expand Up @@ -304,4 +303,4 @@ which is the first one defined or the one configured via the
Each connection is also accessible via the ``doctrine.dbal.[name]_connection``
service where ``[name]`` if the name of the connection.

.. _DBAL documentation: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/index.html
.. _DBAL documentation: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html