Portkey-AI / gateway

A Blazing Fast AI Gateway with integrated Guardrails. Route to 200+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
https://portkey.ai/features/ai-gateway
MIT License
6.33k stars 451 forks source link

[Feature] Valid SQL PLugin #516

Open siddharthsambharia-portkey opened 3 months ago

siddharthsambharia-portkey commented 3 months ago

What Would You Like to See with the Gateway?

Plugin Name: Valid SQL Plugin Description: Validates whether the given SQL code is syntactically correct

Here is the Contributing Guide for Plugin

keshavkrishna commented 1 month ago

@VisargD can i work on this

VisargD commented 1 month ago

Sure. Assigning the issue to you. Thanks!

5war00p commented 3 weeks ago

@vrushankportkey Looks like no activity here as well, can I take this up?

Question: What is the scope of this, do we consider about DB specific syntaxes here? or just a regular SQL only. And is it okay to use js sql parser kind of package for this.

I'm thinking to use node-sql-parser, as it comes with support of 13 DBs. But looks like bundle size is bit heavier: image.

vrushankportkey commented 3 weeks ago

Hi @5war00p please take it up! Yes we would like the bundle size to be as small as possible. @VisargD thoughts?

5war00p commented 3 weeks ago

Yeah makes sense, I'm not sure whether it is tree-shakable or not. We should validate that as well, if we are choosing some package.