Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chunker ¶
func Chunkify ¶
Chunkify will break up things to be inserted based on the number of params in the statement. It is required because postgres has a limit on the number of params in a single statement (65535). Inserting events using NamedExec involves 3n params (n=number of events), meaning it's easy to hit the limit in rooms like Matrix HQ. This function breaks up the events into chunks which can be batch inserted in multiple statements. Without this, you'll see errors like:
"pq: got 95331 parameters but PostgreSQL only supports 65535 parameters"
Click to show internal directories.
Click to hide internal directories.