eacdy / redis-jdbc

A JDBC Driver for Redis which is based on Jedis.
Apache License 2.0
32 stars 7 forks source link

DBeaver integration with extra rendering on some commands #4

Open michaelpro1 opened 1 year ago

michaelpro1 commented 1 year ago

Few enhancements to support the querying using DBeaver. Try it out in IntelliJ as that might need more tweaking.

  1. Render timestamp in separate column called TIMESTAMP (TTL & PTTL)

Before:

RESULTS 1

After

RESULTS | TIMESTAMP 1 | 2022-11-01....

  1. Render hash get operations

RESULTS key val

After

KEY | VALUE key | val

  1. Allow set/get of the schema via sql

    USE ?

SET syntax conflicts with redis commands

SELECT DB_NAME()

  1. Basic input support with spaces (single/double quotes) + command case-insensitiveness

    SET 'my key' "my value"

PG syntax is too complicated with search_path

  1. DBeaver specific stuff

Requires PreparedStatement, otherwise fails changing schema. Now it detects the schema from connection. PreparedStatement impl is very bare to only support that use-case. Wish lombok had an annotation for this

michaelpro1 commented 1 year ago

@eacdy let me know if you're interested in merging, otherwise i will keep it as fork