Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
571 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "3.2-dev" | ||
"dev-master": "4.0-dev" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
How to install SQL Server | ||
========================= | ||
|
||
1. Download & Install SQL server with "basic" option: https://www.microsoft.com/sql-server/sql-server-2019 | ||
2. After installation, open console using `sqlcmd -s localhost\SQLEXPRESS -E` | ||
3. Use this commands to enable `sa` account: | ||
``` | ||
USE [master] | ||
GO | ||
ALTER LOGIN [sa] WITH PASSWORD = 'your-password', CHECK_POLICY=OFF | ||
GO | ||
ALTER LOGIN [sa] ENABLE | ||
GO | ||
CREATE DATABSE nextras_dbal_test | ||
GO | ||
``` | ||
4. Enable username login in registry: in `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQLServer` set `LoginMode` to `2`, where `MSSQL12.SQLEXPRESS` is a name of your db instance. | ||
5. Restart server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the Nextras\Orm library. | ||
* @license MIT | ||
* @link https://github.com/nextras/orm | ||
*/ | ||
|
||
namespace Nextras\Dbal\Platforms\Data; | ||
|
||
|
||
class Column | ||
{ | ||
/** @var string */ | ||
public $name; | ||
|
||
/** @var string */ | ||
public $type; | ||
|
||
/** @var int|null */ | ||
public $size; | ||
|
||
/** @var string|null */ | ||
public $default; | ||
|
||
/** @var bool */ | ||
public $isPrimary; | ||
|
||
/** @var bool */ | ||
public $isAutoincrement; | ||
|
||
/** @var bool */ | ||
public $isUnsigned; | ||
|
||
/** @var bool */ | ||
public $isNullable; | ||
|
||
/** | ||
* @var mixed[] | ||
* @phpstan-var array<string, mixed> | ||
*/ | ||
public $meta; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
/** | ||
* This file is part of the Nextras\Orm library. | ||
* @license MIT | ||
* @link https://github.com/nextras/orm | ||
*/ | ||
|
||
namespace Nextras\Dbal\Platforms\Data; | ||
|
||
|
||
class ForeignKey | ||
{ | ||
/** @var string */ | ||
public $name; | ||
|
||
/** @var string */ | ||
public $schema; | ||
|
||
/** @var string */ | ||
public $column; | ||
|
||
/** @var string */ | ||
public $refTable; | ||
|
||
/** @var string */ | ||
public $refTableSchema; | ||
|
||
/** @var string */ | ||
public $refColumn; | ||
|
||
|
||
public function getNameFqn(): string | ||
{ | ||
return "$this->schema.$this->name"; | ||
} | ||
|
||
|
||
public function getRefTableFqn(): string | ||
{ | ||
return "$this->refTableSchema.$this->refTable"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the Nextras\Orm library. | ||
* @license MIT | ||
* @link https://github.com/nextras/orm | ||
*/ | ||
|
||
namespace Nextras\Dbal\Platforms\Data; | ||
|
||
|
||
class Table | ||
{ | ||
/** @var string */ | ||
public $name; | ||
|
||
/** @var string */ | ||
public $schema; | ||
|
||
/** @var bool */ | ||
public $isView; | ||
|
||
|
||
public function getNameFqn(): string | ||
{ | ||
return "$this->schema.$this->name"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.