@@ -109,14 +109,14 @@ def init(self):
109109 db_name = self .db_config ["database" ]
110110 hint = "/*+ SET_VAR(imci_enable_fast_vector_search=on) */"
111111
112- self .insert_sql = f"INSERT INTO { db_name } .{ self .table_name } (id, v) VALUES (%s, _binary %s)" # noqa: S608
112+ self .insert_sql = f"INSERT INTO { db_name } .{ self .table_name } (id, v) VALUES (%s, _binary %s)"
113113 self .select_sql = (
114- f"SELECT { hint } id FROM { db_name } .{ self .table_name } " # noqa: S608
114+ f"SELECT { hint } id FROM { db_name } .{ self .table_name } "
115115 f"ORDER BY DISTANCE(v, _binary %s, '{ metric_type } ') "
116116 f"LIMIT %s"
117117 )
118118 self .select_sql_with_filter = (
119- f"SELECT id FROM { db_name } .{ self .table_name } " # noqa: S608
119+ f"SELECT id FROM { db_name } .{ self .table_name } "
120120 f"WHERE id >= %s "
121121 f"ORDER BY DISTANCE(v, _binary %s, '{ metric_type } ') "
122122 f"LIMIT %s"
@@ -218,7 +218,7 @@ def _insert_batch(self, embeddings: list[list[float]], metadata: list[int], offs
218218 conn , cursor = self ._create_connection ()
219219 try :
220220 db_name = self .db_config ["database" ]
221- insert_sql = f"INSERT INTO { db_name } .{ self .table_name } (id, v) VALUES (%s, _binary %s)" # noqa: S608
221+ insert_sql = f"INSERT INTO { db_name } .{ self .table_name } (id, v) VALUES (%s, _binary %s)"
222222 batch_data = []
223223 for i in range (offset , offset + size ):
224224 batch_data .append ((int (metadata [i ]), self .vector_to_hex (embeddings [i ])))
0 commit comments