Lotus - Lightweight, SQL query runner and storage for Phoenix apps

Yeah Blazer is amazing and I felt we were missing this in the Elixir/Phoenix ecosystem.

Looking forward to your feedback

1 Like

New Lotus Web 0.4.1 and Lotus 0.9.0 release:

Added a handful of features to this one and retouches the UI for a better look an experience:

1) Dynamic Variable Options Configuration:

There is a new dropdown options modal to configure options for the variable dropdown widget. You can add custom lists of static options or define a SQL query that returns a value or a pair of value,label to dynamically populate the options of the dropdown widget.

2) Multi-Database Schema Support:

For Postgres databases, you can now select which schemas you want to query. By default, it will execute against the public schema if none is selected. If you select one or more schemas, they will be added to the the query’s search_path.

3) Context-aware Schema Editor Completions:

We know have some context-awareness in the editor so we can better suggest columns that are relevant for the query you are writing. Instead of keywords, you will now see table names are columns suggested at the top.

4) Enhanced Query Result UI:

Lotus Web now shows a success label when a query is run and includes the total number of rows in the result and the execution time in milliseconds.

5) Other UI/UX Improvements

  • Theme switcher (Light/Dark/System)
  • Copy to clipboard button (whatever you have in the editor)
  • Editor and global keyboard shortcuts

While LotusWeb already has a solid feature set and its API surface is stabilizing, it’s still evolving. LotusWeb is generally safe to use in production. It relies on Lotus’s read-only execution and session safety.

However, if your application uses UUIDs or mixed ID formats, there are current limitations that affect how variables work in the LotusWeb UI:

  • Variable binding around UUID columns is constrained across different storage types and databases:

    • PostgreSQL uuid

    • MySQL BINARY(16) vs CHAR(36|32)

    • SQLite TEXT vs BLOB

  • You can still get a lot of value from the UI, but filtering on UUID columns with {{var}} will likely not work in Postgres as it warrants a special binary format that is not UI friendly (we convert to String for the UI but currently have no way to cast it back with runtime column inference).

Any feedback on bugs or limitation you find is welcome!

3 Likes

Almost forgot a big one: You can now export results to CSV too :tada:

6 Likes

New package website with demo you can play with:

5 Likes