fknx / linqpad-postgresql-driver

LINQPad PostgreSQL Driver
MIT License
43 stars 17 forks source link

Add ddl editing support #13

Closed henrik-m closed 7 years ago

henrik-m commented 8 years ago

Enables the function context menu known from the baked-in driver for PostgreSQL functions: pgsql_functions_contextmenu

The solution is a bit hacky because unfortunately there are no real extension points provided by the Linqpad API. All of the methods are hardcoded for SQL Server so we have to intercept the statements before they are sent to the database server and rewrite them in PgSql.

One thing we cannot intercept is the "ALTER" statement in function definitions: pgsql_functions_edit

This is a simple String.Replace in the Linqpad codebase so we can do nothing about it for now.

henrik-m commented 8 years ago

@fknx : I have resolved the conflict within the csproj file that prevented this from being merged.

fknx commented 7 years ago

I know it's been ages and you've probably already forgotten about this pull request, but I'm closing this now since the solution is a bit hacky (as you said :)) and I don't want a future LINQPad update to break the driver.

henrik-m commented 7 years ago

No problem. I hope one day the LINQPad team will provide a proper extension point.