Db
in package
Provides a basis for other query builders to base on.
Table of Contents
Properties
- $application : PioniaApplication
- The Pionia application instance
- $connection : Connection
- The connection to use
- $porm : Porm
- The database query instance
Methods
- __construct() : mixed
- Setup the database connection
- from() : Porm
- This sets the table to use
- info() : array<string|int, mixed>
- Returns the details of the current db connection
- logs() : Arrayable|null
- table() : Porm
- This is for running queries in a containerised environment.
- using() : Porm
- Sets up the database connection
- setup() : void
- Sets up the database connection
Properties
$application
The Pionia application instance
private
PioniaApplication
$application
$connection
The connection to use
private
Connection
$connection
$porm
The database query instance
private
Porm
$porm
Methods
__construct()
Setup the database connection
public
__construct([PioniaApplication|null $application = null ][, Connection|null|string|array<string|int, mixed> $connection = 'default' ]) : mixed
Parameters
- $application : PioniaApplication|null = null
- $connection : Connection|null|string|array<string|int, mixed> = 'default'
from()
This sets the table to use
public
from(string $table[, string|null $alias = null ][, string|null $using = null ]) : Porm
Parameters
- $table : string
-
The table to use
- $alias : string|null = null
-
The alias to use
- $using : string|null = null
Tags
Return values
Porminfo()
Returns the details of the current db connection
public
info() : array<string|int, mixed>
Return values
array<string|int, mixed>logs()
public
static logs() : Arrayable|null
Return values
Arrayable|nulltable()
This is for running queries in a containerised environment.
public
static table(string $table[, string|null $alias = null ][, string|null $using = null ]) : Porm
This should be the preferred in frameworks like Pionia
Parameters
- $table : string
- $alias : string|null = null
- $using : string|null = null
Tags
Return values
Pormusing()
Sets up the database connection
public
using([mixed $connection = 'default' ]) : Porm
Parameters
- $connection : mixed = 'default'
Tags
Return values
Pormsetup()
Sets up the database connection
private
setup([mixed $connection = 'default' ]) : void
Parameters
- $connection : mixed = 'default'