Skip to content

Parameters in the query rest-endpoint - #11969

Merged
ea-rus merged 2 commits into
releases/25.12.0from
query-parameters
Dec 4, 2025
Merged

Parameters in the query rest-endpoint #11969
ea-rus merged 2 commits into
releases/25.12.0from
query-parameters

Conversation

@ea-rus

@ea-rus ea-rus commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Description

Option to pass query with parameters:

requests.post(
   'http://127.0.0.1:47334/api/sql/query',
   json={
      'query': 'select * from products where category=:cat_type',
      'params': {'cat_type': 'laptops'}
   }
)

Parameters and query can be prepared with script: https://gist.github.com/ea-rus/3608e3e1b105c685ea82e0261dbfd7f6

Dependent on mindsdb/mindsdb_sql_parser#74

Fixes https://linear.app/mindsdb/issue/FQE-1795/parameterized-queries

Type of change

  • ⚡ New feature (non-breaking change which adds functionality)

Verification Process

To ensure the changes are working as expected:

  • Test Location: Specify the URL or path for testing.
  • Verification Steps: Outline the steps or queries needed to validate the change. Include any data, configurations, or actions required to reproduce or see the new functionality.

Additional Media:

  • I have attached a brief loom video or screenshots showcasing the new functionality or change.

Checklist:

  • My code follows the style guidelines(PEP 8) of MindsDB.
  • I have appropriately commented on my code, especially in complex areas.
  • Necessary documentation updates are either made or tracked in issues.
  • Relevant unit and integration tests are updated or added.

@entelligence-ai-pr-reviews

Copy link
Copy Markdown
Contributor

Entelligence AI Vulnerability Scanner

Status: No security vulnerabilities found

Your code passed our comprehensive security analysis.

Analyzed 3 files in total

@ea-rus
ea-rus requested a review from StpMax December 4, 2025 14:33
@ea-rus
ea-rus merged commit bcfe50b into releases/25.12.0 Dec 4, 2025
32 of 33 checks passed
@ea-rus
ea-rus deleted the query-parameters branch December 4, 2025 16:39
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants