mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 15:24:03 +00:00
Rename ValidatesSqlParameters to ValidatesDatabaseParameters
This commit is contained in:
parent
4a3e6bae00
commit
740d53e9cc
3 changed files with 5 additions and 7 deletions
|
|
@ -6,9 +6,7 @@ namespace Stancl\Tenancy\Database\Concerns;
|
||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
|
|
||||||
// todo@validation this trait's name might be a bit misleading
|
trait ValidatesDatabaseParameters
|
||||||
// it suggests validating parameters for SQL statements, but it is also used in SQLiteDatabaseManager to validate the database file name
|
|
||||||
trait ValidatesSqlParameters
|
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Characters allowed in the parameters.
|
* Characters allowed in the parameters.
|
||||||
|
|
@ -7,14 +7,14 @@ namespace Stancl\Tenancy\Database\TenantDatabaseManagers;
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use PDO;
|
use PDO;
|
||||||
use Stancl\Tenancy\Database\Concerns\ValidatesSqlParameters;
|
use Stancl\Tenancy\Database\Concerns\ValidatesDatabaseParameters;
|
||||||
use Stancl\Tenancy\Database\Contracts\TenantDatabaseManager;
|
use Stancl\Tenancy\Database\Contracts\TenantDatabaseManager;
|
||||||
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
|
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
class SQLiteDatabaseManager implements TenantDatabaseManager
|
class SQLiteDatabaseManager implements TenantDatabaseManager
|
||||||
{
|
{
|
||||||
use ValidatesSqlParameters;
|
use ValidatesDatabaseParameters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQLite database directory path.
|
* SQLite database directory path.
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@ namespace Stancl\Tenancy\Database\TenantDatabaseManagers;
|
||||||
|
|
||||||
use Illuminate\Database\Connection;
|
use Illuminate\Database\Connection;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Stancl\Tenancy\Database\Concerns\ValidatesSqlParameters;
|
use Stancl\Tenancy\Database\Concerns\ValidatesDatabaseParameters;
|
||||||
use Stancl\Tenancy\Database\Contracts\StatefulTenantDatabaseManager;
|
use Stancl\Tenancy\Database\Contracts\StatefulTenantDatabaseManager;
|
||||||
use Stancl\Tenancy\Database\Exceptions\NoConnectionSetException;
|
use Stancl\Tenancy\Database\Exceptions\NoConnectionSetException;
|
||||||
|
|
||||||
abstract class TenantDatabaseManager implements StatefulTenantDatabaseManager
|
abstract class TenantDatabaseManager implements StatefulTenantDatabaseManager
|
||||||
{
|
{
|
||||||
use ValidatesSqlParameters;
|
use ValidatesDatabaseParameters;
|
||||||
|
|
||||||
/** The database connection to the server. */
|
/** The database connection to the server. */
|
||||||
protected string $connection;
|
protected string $connection;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue