Skip to content

fix(sql_database): gracefully handle empty or unserializable query#70

Merged
mta-edi-sugiarto merged 1 commit intomainfrom
fix(sql_generation)/fix-sql-error-on-zero-entries
Sep 28, 2025
Merged

fix(sql_database): gracefully handle empty or unserializable query#70
mta-edi-sugiarto merged 1 commit intomainfrom
fix(sql_generation)/fix-sql-error-on-zero-entries

Conversation

@mta-edi-sugiarto
Copy link
Contributor

The SQL query execution method previously returned an empty string for queries that yielded no results. This could lead to ambiguity and potential errors in services consuming this output.

This change ensures the method consistently returns a string representation of an empty list ("[]") in the following cases:

  • The query returns no rows.
  • The query result is empty after fetching.
  • An error occurs during result serialization.

This provides a more predictable and robust interface for consumers.

…sults

The SQL query execution method previously returned an empty string for queries that yielded no results. This could lead to ambiguity and potential errors in services consuming this output.

This change ensures the method consistently returns a string representation of an empty list (`"[]"`) in the following cases:
- The query returns no rows.
- The query result is empty after fetching.
- An error occurs during result serialization.

This provides a more predictable and robust interface for consumers.
@mta-edi-sugiarto mta-edi-sugiarto merged commit c8fb14a into main Sep 28, 2025
@mta-edi-sugiarto mta-edi-sugiarto deleted the fix(sql_generation)/fix-sql-error-on-zero-entries branch September 28, 2025 07:32
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.

1 participant