PostgresDialect
Class: PostgresDialect
Defined in: packages/postgres/src/dialect.ts:9
PostgreSQL JSONB syntax: uuid VARCHAR(255) key, data jsonb document, $n placeholders
Extended by
Implements
Constructors
Constructor
new PostgresDialect():
PostgresDialect
Returns
PostgresDialect
Properties
binaryCollation
readonlybinaryCollation: "COLLATE \"C\""
Defined in: packages/postgres/src/dialect.ts:13
Binary collation
Implementation of
Methods
asNumber()
asNumber(
json):string
Defined in: packages/postgres/src/dialect.ts:52
Parameters
json
string
Returns
string
Implementation of
asString()
asString(
json):string
Defined in: packages/postgres/src/dialect.ts:57
Parameters
json
string
Returns
string
Implementation of
backfillTypes()
backfillTypes(
table):string
Defined in: packages/postgres/src/dialect.ts:191
Parameters
table
string
Returns
string
Implementation of
bulkAssign()
bulkAssign(
table,assignments,values):string
Defined in: packages/postgres/src/dialect.ts:164
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
checkIndex()
protectedcheckIndex(index):number
Defined in: packages/postgres/src/dialect.ts:242
Check index
Parameters
index
number
an array index written inside a JSON path literal
Returns
number
the validated index
checkKey()
protectedcheckKey(key):void
Defined in: packages/postgres/src/dialect.ts:219
Check key
Parameters
key
string
a key segment written inside a JSON path literal
Returns
void
checkPath()
protectedcheckPath(path):string[]
Defined in: packages/postgres/src/dialect.ts:230
Check path
Parameters
path
string[]
path segments written inside a JSON path literal
Returns
string[]
the validated segments
collectionItemCondition()
collectionItemCondition(
attr,index,field,valueParam):string
Defined in: packages/postgres/src/dialect.ts:151
Parameters
attr
string
index
number | undefined
field
string
valueParam
number
Returns
string
Implementation of
SQLDialect.collectionItemCondition
contains()
contains(
json,value):string
Defined in: packages/postgres/src/dialect.ts:72
Parameters
json
string
value
string | number | boolean
Returns
string
Implementation of
countStoredTypes()
countStoredTypes(
table):string
Defined in: packages/postgres/src/dialect.ts:196
Parameters
table
string
Returns
string
Implementation of
createTable()
createTable(
table):string
Defined in: packages/postgres/src/dialect.ts:82
Parameters
table
string
Returns
string
Implementation of
decode()
decode(
value):any
Defined in: packages/postgres/src/dialect.ts:211
pg parses jsonb columns
Parameters
value
any
Returns
any
Implementation of
distinctFrom()
distinctFrom(
left,right):string
Defined in: packages/postgres/src/dialect.ts:67
Parameters
left
string
right
string
Returns
string
Implementation of
hasStoredType()
hasStoredType():
string
Defined in: packages/postgres/src/dialect.ts:95
Returns
string
Implementation of
increment()
increment(
entries,updateDate,args):string
Defined in: packages/postgres/src/dialect.ts:122
Parameters
entries
object[]
updateDate
string
args
any[]
Returns
string
Implementation of
isObjectRow()
isObjectRow():
string
Defined in: packages/postgres/src/dialect.ts:203
Returns
string
Implementation of
isType()
isType(
json,type):string
Defined in: packages/postgres/src/dialect.ts:47
Parameters
json
string
type
JSONType
Returns
string
Implementation of
isUniqueViolation()
isUniqueViolation(
err):boolean
Defined in: packages/postgres/src/dialect.ts:90
unique_violation
Parameters
err
unknown
Returns
boolean
Implementation of
jsonParam()
jsonParam(
i):string
Defined in: packages/postgres/src/dialect.ts:21
Parameters
i
number
Returns
string
Implementation of
jsonText()
jsonText(
path):string
Defined in: packages/postgres/src/dialect.ts:26
Parameters
path
string[]
Returns
string
Implementation of
jsonValue()
jsonValue(
path):string
Defined in: packages/postgres/src/dialect.ts:31
Parameters
path
string[]
Returns
string
Implementation of
jsonValueOrNull()
jsonValueOrNull(
path):string
Defined in: packages/postgres/src/dialect.ts:36
Parameters
path
string[]
Returns
string
Implementation of
keptType()
keptType(
mapParam):string
Defined in: packages/postgres/src/dialect.ts:100
Parameters
mapParam
number
Returns
string
Implementation of
keyText()
keyText(
key):string
Defined in: packages/postgres/src/dialect.ts:41
Parameters
key
string
Returns
string
Implementation of
like()
like(
text,pattern):string
Defined in: packages/postgres/src/dialect.ts:77
Parameters
text
string
pattern
string
Returns
string
Implementation of
placeholder()
placeholder(
i):string
Defined in: packages/postgres/src/dialect.ts:16
Parameters
i
number
Returns
string
Implementation of
removeCollectionItem()
removeCollectionItem(
attr,index,updateDate):string
Defined in: packages/postgres/src/dialect.ts:145
Parameters
attr
string
index
number
updateDate
string
Returns
string
Implementation of
SQLDialect.removeCollectionItem
removeKey()
removeKey(
attribute,args):string
Defined in: packages/postgres/src/dialect.ts:116
Parameters
attribute
string
args
any[]
Returns
string
Implementation of
setCollectionItem()
setCollectionItem(
attr,itemParam,index,updateDate):string
Defined in: packages/postgres/src/dialect.ts:133
Parameters
attr
string
itemParam
number
index
number | undefined
updateDate
string
Returns
string
Implementation of
shallowMerge()
shallowMerge(
json,patch,args):string
Defined in: packages/postgres/src/dialect.ts:110
Parameters
json
string
patch
Record<string, any>
args
any[]
Returns
string
Implementation of
typedAttribute()
typedAttribute(
text,json,type):string
Defined in: packages/postgres/src/dialect.ts:62
Parameters
text
string
json
string
type
"number" | "boolean"
Returns
string
Implementation of
withStoredType()
withStoredType(
json,type):string
Defined in: packages/postgres/src/dialect.ts:105
Parameters
json
string
type
string
Returns
string