PostgresDialect
Class: PostgresDialect
Defined in: postgres/src/dialect.ts:7
PostgreSQL JSONB syntax: uuid VARCHAR(255) key, data jsonb document, $n placeholders
Implements
Constructors
Constructor
new PostgresDialect():
PostgresDialect
Returns
PostgresDialect
Properties
binaryCollation
readonlybinaryCollation: "COLLATE \"C\""
Defined in: postgres/src/dialect.ts:8
Clause ordering text in code unit order: COLLATE "C" / COLLATE BINARY
Implementation of
Methods
asNumber()
asNumber(
json):string
Defined in: postgres/src/dialect.ts:46
Parameters
json
string
Returns
string
Implementation of
asString()
asString(
json):string
Defined in: postgres/src/dialect.ts:51
Parameters
json
string
Returns
string
Implementation of
backfillTypes()
backfillTypes(
table):string
Defined in: postgres/src/dialect.ts:177
Parameters
table
string
Returns
string
Implementation of
bulkAssign()
bulkAssign(
table,assignments,values):string
Defined in: postgres/src/dialect.ts:150
One step per jsonb_set, each reading the previous one (d0 is the row data): the SQL stays linear in size
Parameters
table
string
assignments
object[]
values
any[]
Returns
string
Implementation of
collectionItemCondition()
collectionItemCondition(
attr,index,field,valueParam):string
Defined in: postgres/src/dialect.ts:142
Parameters
attr
string
index
number | undefined
field
string
valueParam
number
Returns
string
Implementation of
SQLDialect.collectionItemCondition
contains()
contains(
json,value):string
Defined in: postgres/src/dialect.ts:66
Parameters
json
string
value
string | number | boolean
Returns
string
Implementation of
countStoredTypes()
countStoredTypes(
table):string
Defined in: postgres/src/dialect.ts:182
Parameters
table
string
Returns
string
Implementation of
createTable()
createTable(
table):string
Defined in: postgres/src/dialect.ts:76
Parameters
table
string
Returns
string
Implementation of
decode()
decode(
value):any
Defined in: postgres/src/dialect.ts:197
pg parses jsonb columns
Parameters
value
any
Returns
any
Implementation of
distinctFrom()
distinctFrom(
left,right):string
Defined in: postgres/src/dialect.ts:61
Parameters
left
string
right
string
Returns
string
Implementation of
hasStoredType()
hasStoredType():
string
Defined in: postgres/src/dialect.ts:89
Returns
string
Implementation of
increment()
increment(
entries,updateDate,args):string
Defined in: postgres/src/dialect.ts:116
Parameters
entries
object[]
updateDate
string
args
any[]
Returns
string
Implementation of
isObjectRow()
isObjectRow():
string
Defined in: postgres/src/dialect.ts:189
Returns
string
Implementation of
isType()
isType(
json,type):string
Defined in: postgres/src/dialect.ts:41
Parameters
json
string
type
JSONType
Returns
string
Implementation of
isUniqueViolation()
isUniqueViolation(
err):boolean
Defined in: postgres/src/dialect.ts:84
unique_violation
Parameters
err
unknown
Returns
boolean
Implementation of
jsonParam()
jsonParam(
i):string
Defined in: postgres/src/dialect.ts:16
Parameters
i
number
Returns
string
Implementation of
jsonText()
jsonText(
path):string
Defined in: postgres/src/dialect.ts:21
Parameters
path
string[]
Returns
string
Implementation of
jsonValue()
jsonValue(
path):string
Defined in: postgres/src/dialect.ts:26
Parameters
path
string[]
Returns
string
Implementation of
jsonValueOrNull()
jsonValueOrNull(
path):string
Defined in: postgres/src/dialect.ts:31
Parameters
path
string[]
Returns
string
Implementation of
keptType()
keptType(
mapParam):string
Defined in: postgres/src/dialect.ts:94
Parameters
mapParam
number
Returns
string
Implementation of
keyText()
keyText(
key):string
Defined in: postgres/src/dialect.ts:36
Parameters
key
string
Returns
string
Implementation of
like()
like(
text,pattern):string
Defined in: postgres/src/dialect.ts:71
Parameters
text
string
pattern
string
Returns
string
Implementation of
placeholder()
placeholder(
i):string
Defined in: postgres/src/dialect.ts:11
Parameters
i
number
Returns
string
Implementation of
removeCollectionItem()
removeCollectionItem(
attr,index,updateDate):string
Defined in: postgres/src/dialect.ts:137
Parameters
attr
string
index
number
updateDate
string
Returns
string
Implementation of
SQLDialect.removeCollectionItem
removeKey()
removeKey(
attribute,args):string
Defined in: postgres/src/dialect.ts:110
Parameters
attribute
string
args
any[]
Returns
string
Implementation of
setCollectionItem()
setCollectionItem(
attr,itemParam,index,updateDate):string
Defined in: postgres/src/dialect.ts:126
Parameters
attr
string
itemParam
number
index
number | undefined
updateDate
string
Returns
string
Implementation of
shallowMerge()
shallowMerge(
json,patch,args):string
Defined in: postgres/src/dialect.ts:104
Parameters
json
string
patch
Record<string, any>
args
any[]
Returns
string
Implementation of
typedAttribute()
typedAttribute(
text,json,type):string
Defined in: postgres/src/dialect.ts:56
Parameters
text
string
json
string
type
"number" | "boolean"
Returns
string
Implementation of
withStoredType()
withStoredType(
json,type):string
Defined in: postgres/src/dialect.ts:99
Parameters
json
string
type
string
Returns
string