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

refactor: combine exec and query database tools #371

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

njhale
Copy link
Member

@njhale njhale commented Jan 24, 2025

  • Combine the Run Database Query and Exec Database Statement tools
    into a single Run Database Command tool that allows for executing both
    statements and queries. The new tool returns the raw SQL output
    instead of JSON
  • Shell out to the sqlite3 binary instead of using a dependency-free go
    module
  • Add the list_database_tables and list_database_table_rows
    tools to retain database support in the user UI.

Addresses part of obot-platform/obot#1448

@njhale
Copy link
Member Author

njhale commented Jan 24, 2025

Getting some recoverable quoting issues with the tool arguments. Going to play with it a bit before I open it up for review.

@njhale
Copy link
Member Author

njhale commented Jan 27, 2025

Getting some recoverable quoting issues with the tool arguments. Going to play with it a bit before I open it up for review.

squared this away with some additional context.

database/pkg/cmd/command.go Show resolved Hide resolved
database/tool.gpt Outdated Show resolved Hide resolved
@njhale njhale force-pushed the refactor/database branch from 9640a42 to 5151d11 Compare January 27, 2025 18:25
njhale added a commit to njhale/obot that referenced this pull request Jan 27, 2025
- Combine the `Run Database Query` and `Exec Database Statement` tools
  into a single `Run Database Command` tool that allows for executing both
  statements and queries. The new tool returns the raw SQL output
  instead of JSON
- Shell out to the sqlite3 binary instead of using a dependency-free go
  module
- Add the `list_database_tables` and `list_database_table_rows`
  system tools to retain database support in the user UI

Signed-off-by: Nick Hale <[email protected]>
@njhale njhale merged commit afc7428 into obot-platform:main Jan 27, 2025
1 check passed
njhale added a commit to obot-platform/obot that referenced this pull request Jan 27, 2025
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

Successfully merging this pull request may close these issues.

3 participants