New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Data Connectors (SQL) #766
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -1,7 +1,8 @@ | |||
// This file is automatically generated by quadratic-core/src/bin/export_types.rs | |||
// Do not modify it manually. | |||
|
|||
export type CodeCellLanguage = "Python" | "Formula"; | |||
export type CodeCellLanguage = "Python" | "Formula" | { "Connection": { kind: ConnectionKind, id: string, } }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddimaria minor, but can we rename id
to uuid
? It is a UUID string and that's how it's represented in the API, so it makes the client code a bit more uniform when we're working with this, e.g.
connectionsFromApi.find(connection => connection.uuid === editorInteractionState.mode?.Connection?.uuid)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we refer to the kind
as type
in the API as well, might be worth aligning on this language as wel...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rustland used kind instead of type b/c type is a reserved word. I can look into rewriting during serialization.
I have a small opinion about not changing id to uuid (seems like a database antipattern to have two unique identifiers...a UUID type in Postgres is idiomatic for the PK, I think we use the id as an index or ordering mechanism?). Also, calling it a uuid feels a bit like Hungarian notation.
Goals
Add a SQL connection
Support Postgres, MySQL
Connection Code Editor
Run code to get data in sheet
Basic schema viewer
main
@jimnielsClient
TODO: (connections)
in the PRCore
API
/connections
for{ type: 'postgres' }
or{ type: 'mysql' }
/connections
/connections/:uuid
(TODO: should not return sensitive info)/connections/:uuid
/internal/user/:auth0Id/connections/:uuid
(returns sensitive info)Connections Service
Deployment