Add support for database functions
- Dominant language
- Go
- Stars
- 786
- Forks
- 61
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 2
Description
Would be nice to have ability to specify some common functions in filters and default values.
At least few I can think of:
* Current date and time (current_timestamp, current_date, current_time)
* MSSQL - getdate(), convert (date, getdate()), convert (time, getdate())
* upper/lower - same for all currently supported
* substring
* PostgreSQL - `substring ( string text [ FROM start integer ] [ FOR count integer ] )`
* MSSQL, sqlite3, MySQL - `substring ( expression, start, length )`
* nullif/coalesce - same for all currently supported
* least/greatest
* sqlite3 - min, max
* MSSQL, PostgreSQL, MySQL - least, greatest
Probably some others and have adapter to build them as on different databases this can be different
Contributor guide
Research direction
Start by reviewing the database adapter layer and how filters and default values are currently built for PostgreSQL, MySQL, and SQLite. Compare the SQL syntax for current date/time, string, null-handling, and comparison functions across adapters, then define supported functions and verify generated queries for each database.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, mysql, postgresql, sql, sqlite
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100