Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Logging Syntax #195

Open
LukasFehring opened this issue Apr 18, 2024 · 0 comments
Open

Feature Request: Logging Syntax #195

LukasFehring opened this issue Apr 18, 2024 · 0 comments

Comments

@LukasFehring
Copy link
Collaborator

LukasFehring commented Apr 18, 2024

  • PyExperimenter version: Any
  • Database provider: Any
  • Python version: Any
  • Operating System: Any

Description

We currently do not support writing multiple logtable entries at once. Therefore, the only way to do so is by calling the logger multiple times in a row. However MySQL supports logging multiple entries at once.

sql = """
INSERT INTO your_table_name (column1, column2, column3)
VALUES (%s, %s, %s), (%s, %s, %s), (%s, %s, %s)
"""
# Data tuples for insertion
data = (
   'value1a', 'value2a', 'value3a',
   'value1b', 'value2b', 'value3b',
   'value1c', 'value2c', 'value3c'
)
# Execute the SQL command
cursor.execute(sql, data)

We should therefore also allow this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant