Skip to content
Merged
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
6 changes: 6 additions & 0 deletions src/Annotation/AuraSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

use Attribute;

/**
* Sets the `pdo` property to the read or write connection for the methods
* listed in the read and write method lists of AuraSqlLocatorModule
*
* @see \Ray\AuraSqlModule\AuraSqlConnectionInterceptor
*/
#[Attribute(Attribute::TARGET_CLASS)]
final class AuraSql
{
Expand Down
3 changes: 3 additions & 0 deletions src/Annotation/AuraSqlQueryConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use Attribute;
use Ray\Di\Di\Qualifier;

/**
* Qualifies the database type that the Aura.SqlQuery builders are created for
*/
#[Attribute(Attribute::TARGET_PARAMETER), Qualifier]
final class AuraSqlQueryConfig
{
Expand Down
5 changes: 5 additions & 0 deletions src/Annotation/PagerViewOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
use Attribute;
use Ray\Di\Di\Qualifier;

/**
* Qualifies the options passed to the Pagerfanta view that renders the pager HTML
*
* @see https://bearsunday.github.io/manuals/1.0/en/database_aura.html#pagination
*/
#[Attribute(Attribute::TARGET_PARAMETER), Qualifier]
final class PagerViewOption
{
Expand Down
3 changes: 3 additions & 0 deletions src/Annotation/Read.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use Attribute;
use Ray\Di\Di\Qualifier;

/**
* Qualifies the names of the methods that use the read connection in an #[AuraSql] class
*/
#[Attribute(Attribute::TARGET_METHOD|Attribute::TARGET_PARAMETER), Qualifier]
final class Read
{
Expand Down
7 changes: 7 additions & 0 deletions src/Annotation/ReadOnlyConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

use Attribute;

/**
* Sets the `pdo` property to the read (slave) connection before the method runs
* when replication is configured (AuraSqlModule without a slave ignores it)
*
* @see https://bearsunday.github.io/manuals/1.0/en/database_aura.html#replication
* @see \Ray\AuraSqlModule\AuraSqlSlaveDbInterceptor
*/
#[Attribute(Attribute::TARGET_METHOD)]
final class ReadOnlyConnection
{
Expand Down
6 changes: 6 additions & 0 deletions src/Annotation/Transactional.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

use Attribute;

/**
* Runs the method in a database transaction and rolls back when a PDOException is thrown
*
* @see https://bearsunday.github.io/manuals/1.0/en/database_aura.html#transactions
* @see \Ray\AuraSqlModule\TransactionalInterceptor
*/
#[Attribute(Attribute::TARGET_METHOD)]
final class Transactional
{
Expand Down
7 changes: 7 additions & 0 deletions src/Annotation/WriteConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

use Attribute;

/**
* Sets the `pdo` property to the write (master) connection before the method runs
* when replication is configured (AuraSqlModule without a slave ignores it)
*
* @see https://bearsunday.github.io/manuals/1.0/en/database_aura.html#replication
* @see \Ray\AuraSqlModule\AuraSqlMasterDbInterceptor
*/
#[Attribute(Attribute::TARGET_METHOD)]
final class WriteConnection
{
Expand Down
Loading