-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
IDE Builder and Blueprint completions with ide.json
- Loading branch information
Showing
5 changed files
with
152 additions
and
116 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"$schema": "https://laravel-ide.com/schema/laravel-ide-v2.json", | ||
"helperCode": { | ||
"classMixins": [ | ||
{ | ||
"classFqn": "Illuminate\\Contracts\\Database\\Query\\Builder", | ||
"mixinFqn": "Tpetry\\PostgresqlEnhanced\\Query\\Builder" | ||
}, | ||
{ | ||
"classFqn": "Illuminate\\Database\\Query\\Builder", | ||
"mixinFqn": "Tpetry\\PostgresqlEnhanced\\Query\\Builder" | ||
}, | ||
{ | ||
"classFqn": "Illuminate\\Database\\Schema\\Blueprint", | ||
"mixinFqn": "Tpetry\\PostgresqlEnhanced\\Schema\\Blueprint" | ||
}, | ||
{ | ||
"classFqn": "Illuminate\\Database\\Schema\\ColumnDefinition", | ||
"mixinFqn": "Tpetry\\PostgresqlEnhanced\\Schema\\ColumnDefinition" | ||
}, | ||
{ | ||
"classFqn": "Illuminate\\Database\\Schema\\IndexDefinition", | ||
"mixinFqn": "Tpetry\\PostgresqlEnhanced\\Schema\\IndexDefinition" | ||
}, | ||
{ | ||
"classFqn": "Illuminate\\Support\\Facades\\Schema", | ||
"mixinFqn": "Tpetry\\PostgresqlEnhanced\\Support\\Facades\\Schema" | ||
} | ||
] | ||
} | ||
} |
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,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tpetry\PostgresqlEnhanced\Schema; | ||
|
||
use Illuminate\Contracts\Database\Query\Expression; | ||
use Illuminate\Database\Schema\ColumnDefinition as BaseColumnDefinition; | ||
|
||
/** | ||
* @internal This class is not used. It only exists to teach Laravel projects using PHPStan or IDEs supporting auto-suggest about added functionality. | ||
*/ | ||
class ColumnDefinition extends BaseColumnDefinition | ||
{ | ||
/** | ||
* Specify the compression method for TOASTed values (PostgreSQL). | ||
*/ | ||
public function compression(string $algorithm): self | ||
{ | ||
return $this; | ||
} | ||
|
||
/** | ||
* Sets an initial value to the column (PostgreSQL). | ||
*/ | ||
public function initial(mixed $value): self | ||
{ | ||
return $this; | ||
} | ||
|
||
/** | ||
* Specify casting expression when changing the column type (PostgreSQL). | ||
*/ | ||
public function using(string|Expression $expression): self | ||
{ | ||
return $this; | ||
} | ||
} |
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,61 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tpetry\PostgresqlEnhanced\Schema; | ||
|
||
use Illuminate\Database\Schema\IndexDefinition as BaseIndexDefinition; | ||
|
||
/** | ||
* @internal This class is not used. It only exists to teach Laravel projects using PHPStan or IDEs supporting auto-suggest about added functionality. | ||
*/ | ||
class IndexDefinition extends BaseIndexDefinition | ||
{ | ||
/** | ||
* Include non-key columns in the index (PostgreSQL). | ||
* | ||
* @param string|array<int, string> $columns | ||
*/ | ||
public function include(string|array $columns): self | ||
{ | ||
return $this; | ||
} | ||
|
||
/** | ||
* Mark NULLs as not distinct values (PostgreSQL). | ||
*/ | ||
public function nullsNotDistinct(): self | ||
{ | ||
return $this; | ||
} | ||
|
||
/** | ||
* Specify fulltext index weight for columns (PostgreSQL). | ||
* | ||
* @param array<int, string> $labels | ||
*/ | ||
public function weight(array $labels): self | ||
{ | ||
return $this; | ||
} | ||
|
||
/** | ||
* Build a partial index by specifying the rows that should be included (PostgreSQL). | ||
* | ||
* @param string|(callable(\Illuminate\Database\Query\Builder):mixed)|(callable(\Illuminate\Contracts\Database\Query\Builder):mixed) $columns | ||
*/ | ||
public function where(string|callable $columns): self | ||
{ | ||
return $this; | ||
} | ||
|
||
/** | ||
* Specify index parameters to fine-tune its configuration (PostgreSQL). | ||
* | ||
* @param array<string, bool|float|int|string> $options | ||
*/ | ||
public function with(array $options): self | ||
{ | ||
return $this; | ||
} | ||
} |
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