wesql / wescale

WeScale is a Modern MySQL proxy that supports read-write-split, read-after-write-consistency, load balancing and OnlineDDL.
Apache License 2.0
196 stars 8 forks source link

[Feature Request] implement a custom function framework #517

Closed newborn22 closed 2 days ago

newborn22 commented 2 weeks ago

Background

Adding custom functions in Wescale can enhance our ability to modify query results and support potential new features. However, currently, it is not straightforward to add a custom function, such as myadd(int, int), to Wescale.

Proposal

I propose to implement a custom function framework that simplifies the process of adding new custom functions. This framework will allow developers to focus solely on the function logic. Since Wescale is a database proxy without a real execution engine, the idea is to retrieve the query result first, then compute the function result, and finally present it to the user.