From 8b573e9cc09cd35c0996b032db48db0f2f365bc0 Mon Sep 17 00:00:00 2001 From: Matt Barr Date: Thu, 18 Jan 2024 17:13:04 -0600 Subject: [PATCH] Support literal_binds compiling --- pgvector/sqlalchemy/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pgvector/sqlalchemy/__init__.py b/pgvector/sqlalchemy/__init__.py index e6c128a..964a53c 100644 --- a/pgvector/sqlalchemy/__init__.py +++ b/pgvector/sqlalchemy/__init__.py @@ -22,6 +22,10 @@ def process(value): return to_db(value, self.dim) return process + def literal_processor(self, dialect): + # Allows compiling with the literal_binds flag + return self.bind_processor() + def result_processor(self, dialect, coltype): def process(value): return from_db(value)