Skip to content

Commit

Permalink
work on improved data insertion
Browse files Browse the repository at this point in the history
  • Loading branch information
for-hyde committed Oct 16, 2024
1 parent 0fbffb8 commit 3e4697e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion omnipath_metabo/schema/_main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import collections
from sqlalchemy import text, select
from sqlalchemy.dialects.postgresql import insert
import psychopg2.extras

from . import _structure
from ._base import Base
Expand Down Expand Up @@ -106,7 +107,10 @@ def load(self):
self.session.execute(insert_ids)
self.session.commit()


query = """
INSERT INTO structures (smiles) VALUES %s
"""
psychopg2.extras.execute_values(query, (), page_size = 1000)
#self.indexer()

def update_mol_column(self):
Expand Down

0 comments on commit 3e4697e

Please sign in to comment.