Skip to content
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

PostgreSQL wire-compatible API #83

Merged
merged 15 commits into from
Oct 27, 2023
Merged

PostgreSQL wire-compatible API #83

merged 15 commits into from
Oct 27, 2023

Conversation

jeromegn
Copy link
Member

@jeromegn jeromegn commented Oct 26, 2023

Exposes a PostgreSQL wire compatible API

It works like this:

  • Decodes "Frontend" PG messages
  • Encodes "Backend" PG messages
  • Implements the flow as best as possible (described at Message flow)
  • Parses the current SQLite schema to figure out the types of each column in each table
  • Parses every command w/ sqlite3-parser
  • Attempts to figure out the types fo each bound parameter and returned columns

Tested w/ Rust's tokio-postgres client.

Manually tested w/ Elixir's Ecto and Golang's database/sql.

@jeromegn jeromegn marked this pull request as ready for review October 27, 2023 15:24
@jeromegn jeromegn merged commit 19ccb07 into main Oct 27, 2023
3 checks passed
@jeromegn jeromegn deleted the go-sql-compat branch October 27, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant