Skip to content

Use a struct as response from executed query to get the rows and columns #202

@aleDsz

Description

@aleDsz

Hi!

Firstly, I want to say that I loved the project and it's great to have support for SQLite in Elixir.

We have been building a new feature to support SQLite through livebook app and kino_db library, which allows users to input their database path and loads data directly from a Livebook (same as Jupyter Notebook).

And one of our features is to support the "table" format to visualize data, but Exqlite doesn't return a response with columns and rows to make it happen, so I've been thinking about make some contributions to the project.

Context

In this PR we added the support to handle Exqlite connection and how we should execute the user's query input. And our goal is make it easy to implement the Table.Reader protocol from table. Since we're not going to add the protocol here, we only need row and columns information.

Then. I've been thinking if it should be a option in the Exqlite.Connection.connect/1 function or maybe create a new function to fetch all rows and returns the Exqlite.Query struct or maybe a new one to represent the result from SQLite.

What you all think? Would be great to talk about, and if y'all have any recommendations or thoughts, please feel free to send.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions