Git Product home page Git Product logo

psequel's Introduction

ppvan

About me

Hi, I'm Phạm Văn Phúc (aka. ppvan), a backend developper from Vietnam.

Currently, I'm studying at University of Science and Technology (UET).

I use Arch, btw

My skills

Bash C C++ Java Kotlin Python Go

Arch Postgres MySQL SQLite Docker Nginx

ppvan's GitHub stats

Contacts

Mail Mail

psequel's People

Contributors

kra-mo avatar ppvan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kra-mo

psequel's Issues

Add connection.cert_path to database

Update connection save and load logic

  • Update CRUD query, add cert_path column
  • Find a solution to update local database in old version of the app

Update import and export action

Should fixed #44

Flatpak Version SSL Broken

Error message when trying to connect with SSL toggled on.
invalid sslmode value: "required"

Downloaded from Flathub, 0.2.0

Unable to list tables from docker container

I can list my schemas, but I can't list my tables or run any queries while using posgres using docker. Is there something I'm missing?

This is my system info :

NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Docker Image Info: postgres:latest
version: '3.9'

services:
postgres:
image: postgres:latest
container_name: postgres-container
ports:
- '5432:5432'
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- pgdata:/var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d

volumes:
pgdata:

image

PSequel crashes

I think this might be similar to #68:

psequel:2): Psequel-WARNING **: 16:23:53.181: Schema.vala:54: Regex not match: CREATE INDEX subscribers_fxa_profile_json_subscriptions_idx ON public.subscribers USING gin (((fxa_profile_json -> 'subscriptions'::text)))
**
Psequel:ERROR:../src/models/Schema.vala:55:psequel_index_extract_info: code should not be reached
Bail out! Psequel:ERROR:../src/models/Schema.vala:55:psequel_index_extract_info: code should not be reached

This started occurring after I ran this:

CREATE INDEX CONCURRENTLY subscribers_fxa_profile_json_subscriptions_idx ON subscribers USING GIN ((fxa_profile_json->'subscriptions'));

[bug] Psequel won't connect.

$ flatpak run me.ppvan.psequel
(psequel:2): Gtk-WARNING **: 14:46:45.764: No IM module matching GTK_IM_MODULE=cedilla found

(psequel:2): Psequel-CRITICAL **: 14:47:34.674: psequel_connection_view_model_active_connection: assertion 'connection != NULL' failed
$ flatpak info me.ppvan.psequel

psequel - A minimal SQL client

          ID: me.ppvan.psequel
         Ref: app/me.ppvan.psequel/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 0.2.0
     License: GPL-3.0-or-later
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 5.5 MB
     Runtime: org.gnome.Platform/x86_64/46
         Sdk: org.gnome.Sdk/x86_64/46

      Commit: 3a6038eeed7a66d45a5c129442d4a8097596bdb233793f3b2e190fc847036cc9
      Parent: db0dbd08f613718213d7c5b0cbb395f52b887af7e3900eb43cb5c6a89345635c
     Subject: Update me.ppvan.psequel.json (b9c1a9b8)
        Date: 2024-06-23 06:47:35 +0000

support copy rows/columns

Copying entire rows or a column value is not working on the "Data" view and neither in the query result, it would be very useful to copy values. Please consider implementing this.

No SSL support in Flatpak version

Hello,

This app looks great and I'm excited to try it out, but when I try and use an SSL connection in the Flatpak version I get the following error:

sslmode value "require" invalid when SSL support is not compiled in

Would compiling from source resolve this? Am I missing a flatpak dependency?

Using version 0.1.3

Filter in data view

  • Implement fetch data with filter
  • Validate WHERE filters
  • Auto completion for table columns
  • Fix not sync with pagination

Backup database

  • Ability to backup your database like pg_dump
  • Copy table DDL can also be added
  • Export database schema

TODO

  • Allow query with params
  • #5
  • #7
  • Add keyboard short cut for oparations
  • About window and flatpak deployment
  • #14
  • #10
  • #12
  • Run query using Ctrl +
  • #17
  • Query History
  • #21
  • #15

My schema doesn't load and it crashes

I get this error when running from console:


(psequel:2): Psequel-WARNING **: 20:37:13.508: Schema.vala:54: Regex not match: CREATE INDEX table_columnid ON another_table USING btree ("table_id")
**
Psequel:ERROR:../src/models/Schema.vala:55:psequel_index_extract_info: code should not be reached
Bail out! Psequel:ERROR:../src/models/Schema.vala:55:psequel_index_extract_info: code should not be reached

preferences panel, and some functionality issues

  • In the preferences, font family, color scheme, and all options hang on functioning. So, If I change something and then close the preference panel, it hangs on.
  • After table creation, the created table does not show on the left side, on reload, or on logout. Tables only show when on the quit psequel app and then run.

If any additional information or logs are needed to diagnose the problem, please let me know and I'll be happy to provide them.

Improve query builder model and query result model

  • Validate query using postgres parser
  • Optimnize the query building into a separate service (allow build select, update and delete query)
  • Optimize Relation class to better handle query result data
class SQLQueryBuilder:
    def __init__(self, table_name):
        self.table_name = table_name
        self.query = ""
        self.where_clauses = []
        self.order_by = ""
        self.limit = ""

    def select(self, columns):
        self.query = f"SELECT {', '.join(columns)} FROM {self.table_name}"
        return self

    def where(self, column, operator, value):
        where_clause = f"{column} {operator} '{value}'"
        self.where_clauses.append(where_clause)
        return self

    def order_by(self, column, order="ASC"):
        self.order_by = f"ORDER BY {column} {order}"
        return self

    def limit(self, limit_value):
        self.limit = f"LIMIT {limit_value}"
        return self

    def build(self):
        query = self.query
        if self.where_clauses:
            query += " WHERE " + " AND ".join(self.where_clauses)
        if self.order_by:
            query += " " + self.order_by
        if self.limit:
            query += " " + self.limit
        return query

# Example usage
query_builder = SQLQueryBuilder("users")
query = query_builder.select(["name", "email"]) \
                     .where("age", ">", 25) \
                     .where("city", "=", "New York") \
                     .order_by("name") \
                     .limit(10) \
                     .build()

print(query)

TODO

Things i want to add in next version:

  • Remove themes and add light/dark preview #52
  • SSH turnel (i current duno wtf is this, but i'll try)
  • CSV import/export (many possible with postgres COPY command)
  • implement an sql LSP client (not sure i have enough time)
  • Find a way to test the app -> not possible
  • Data cell should be copiable, context menu if needed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.