Skip to content

make prepared statements work correctly #2

@mupat

Description

@mupat

before the query get saved the placeholder for the prepared statement should be replaced by the value. Otherwise postgres is failing with:

Job ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper (id=3597) FAILED (1 prior attempts) with ActionView::Template::Error: PG::ProtocolViolation: ERROR:  bind message supplies 0 parameters, but prepared statement "" requires 1

so for example for where clause:

where: '"investments"."project_id" = $1'

should be

where: '"investments"."project_id" = 2'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions