Giter Club home page Giter Club logo

goat's People

Contributors

asw-dev avatar mispp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

goat's Issues

assign different tab colors to tabs depending on connections they use

  • colors should be randomly assigned in connection manager upon creation
  • each connection should by default have different color (so check what is assigned and pick another one)
  • this can be manually overridden and color selected
  • tab should include both icon of database (elephant for postgres, etc) and color somehow

overall improve focus following

focus is picked on random controls/components based on events.
this should be streamlined so it doesnt look ridiculous.

example:

  1. open a connection
  2. write a query and select it
  3. click 'run selection' button in QueryTab

current results: combobox with open connections receives focus
expected result: codeeditor should have focus?

make queries run as forward-only

Based on the comments in this thread, it seems that using QSqlQueryModel will not work with Forward-Only queries.

For this reason, the model behind table view will have to be redone:

  • use QStandardItemModel
  • QStandardItemModel should be inherited and extended for coloring of null values -> if in a cell is a null value, background should be colored yellow
  • while extracting data, do it in sets of 1000 rows
  • do it in a threaded way

WARNING: for threaded way and forward-only queries, single database connection cannot be used by multiple threads. to solve this, either resource/connection pooling has to be implemented or connection should be cloned, opened and closed within each thread. having connection opening/closing within a new thread will have to be considered while extracting data from query results in chunks.
this question on stackoverflow should be of use

create settings dialog

what comes to mind for first options

  • background color for results grid
  • font and size for editor
  • forward-only chunk size for queries

tab marked as changed even though no changes were done

steps to reproduce:

  1. start app and initiate a connection
  2. in automatically created new tab (Untitled), open a .sql file by clicking on 'open file button' in main toolbar
  3. create a new tab
  4. in new tab, write some query and execute it
  5. click on 1st tab

by executing step 5, tab becomes marked as changed even though no interaction with contents of that tab was done

toolbar icons are not properly rendered on hidpi

Not sure if this happens because of wayland (because there are some issues with rendering when two monitors of different dpi are connected) or because icons are really small.

Look for another icon set - in svg instead of png.

refactoring / code quality improvements

some ideas:

  • take out QSqlQuery in it's own class called Query which should implement functions

    • QList<QStandardItem*> nextResultsChunk(int chunkSize)
    • void stopQuery()
    • bool reconnectDatabase()
    • executeQuery(QString query)
  • not sure how to handle this QAction thing for the QToolButton

    • currently there is a slot in ConnnectionManager that takes .data() from sender() -> i have a bad feeling about this implementation and no idea how to make it better
  • take out the loop from refreshConnectionActions() from MainWindow and move it to connection manager. i guess function has to stay here to first clear old actions before loading new ones

add ability to cancel long-running query

need a way to cancel long-running query.
m_sqlQuery.finish(); and m_queryFuture.cancel(); are not doing anything

option could maybe be to kill a cloned (!) connection

rework connection manager

connection management needs to be reworked. goal here is to implement behavior similar to mssql management studio. this means:

  • every tab can have a different connection to different database (tab1-> mysql, tab2->postgres, tab3->mssql).
  • each tab should be easily identifiable which connection is used
  • each tab should easily switch connection it is using
  • long running query in one tab must not affect other tabs

Therefore,

  • connection manager dialog should be brought back and establishing connection should be handled through it, optional toolbar/treeview control should be added to display established connection
  • menu list of established connections should be added
  • disconnecting should be done based on a list of established connections shown in mentioned tree view control
  • mentioned treeview control would later be used also to view objects in databases (e.g. list tables, then for each table list columns; list users; etc.)
  • to be able to easily identify which connection is used dropbox and execute button(s) should be brought back into the tab itself

setup CI

Travis, google cloud, whatever works

bug closing tabs

when opening two tabs, then closing only the first one, both tabs will be closed.

timestamp looks wrong in msg tab

Timestamp: 2018-53-11 17:53:21
Elapsed: 1 ms
ERROR: syntax error at or near "1"
LINE 1: select *1 from b
^
(42601) QPSQL: Unable to create query

improve code editor component

now, code editor is just extension of qplaintextedit, which is ok, but following features need a lot more work:

  • improvement of the syntax highlight for multiline comments
  • row numbers
  • vertical lines on the right (80 chars)
  • code completion
  • code folding (not really that necessery)

these features are integrated into qscintilla and ktexteditor, so their usage might be the way to go.

  • for ktexteditor switch to cmake is needed
  • for qscintilla settings and color selection for highlight type needs to be further investigated, also how to get 'query at cursor' to submit with ctrl-enter. qscintilla is taken fro sqlitebrowser for testing and is in a separate branch

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.