Skip to content
Open
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
17 changes: 15 additions & 2 deletions src/db/builder/Pgsql.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class Pgsql extends Builder
*
* @var string
*/
protected $insertSql = 'INSERT INTO %TABLE% (%FIELD%) VALUES (%DATA%) %COMMENT%';
protected $insertSql = 'INSERT INTO %TABLE% (%FIELD%) VALUES (%DATA%) %EXTRA% %COMMENT%';

/**
* INSERT ALL SQL表达式.
*
* @var string
*/
protected $insertAllSql = 'INSERT INTO %TABLE% (%FIELD%) %DATA% %COMMENT%';
protected $insertAllSql = 'INSERT INTO %TABLE% (%FIELD%) %DATA% %EXTRA% %COMMENT%';

/**
* limit分析.
Expand Down Expand Up @@ -126,4 +126,17 @@ protected function parseRand(Query $query): string
{
return 'RANDOM()';
}

/**
* 查询额外参数分析.
*
* @param Query $query 查询对象
* @param string $extra 额外参数
*
* @return string
*/
protected function parseExtra(Query $query, string $extra): string
{
return $extra === '' ? '' : ' ' . $extra;
}
}