Giter Site home page Giter Site logo

runsqlrun's People

Contributors

andialbrecht avatar pkkid 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

runsqlrun's Issues

Feature Request: Schema Browser

It would be really nice to have a side bar with the databases which drop down to show the tables. Double clicking a table name should do a SELECT * LIMIT 100 query automatically.

Keyboard shortcuts to move whole queries up/down in editor.

It would be nice to have keyboard shortcuts to move a single statement (i.e. the current statement at cursor position) above/below the prev/next statement in an editor. That'd be an easy way to re-organize statements in a worksheet.

Current shortcuts:
ALT+UP/DOWN - Move current line up/down
ALT+SHIFT+UP/DOWN - Jump to next/prev statement

Proposal:
ALT+PAGEUP/PAGEDOWN - Jump to next/prev statement
ALT+SHIFT+UP/DOWN - Move statement up/down

Highlight errors in editor

When an statement causes an error, the error should be highlighted in the editor, if the database backend provides enough information to find the error in the editor.

The cursor should move to the error location too.

For longer statements the UI should take care that the actual error message is visible,

Improve handling of LOBs in result view (Oracle)

When a query results contains LOBs and the number of results exceeds the visible area (so that the result view has scrollbars) an error is logged on console:

Traceback (most recent call last):
  File "/home/andi/devel/runsqlrun/rsr/worksheet/results.py", line 331, in do_get_value
    data = str(value)
cx_Oracle.ProgrammingError: LOB variable no longer valid after subsequent fetch

LOBs shouldn't be accessed directly when displayed in result list. Instead a simplified text version should be used.

In addition: resizing a column containing LOBs is verrry slow.

Failed to open file 'data/runsqlrun.gresource'

Getting this error when running python3 -m rsr. The file doesn't appear to exist.

Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/mjs7231/Projects/runsqlrun/rsr/__main__.py", line 5, in <module>
    cmd.main()
  File "/home/mjs7231/Projects/runsqlrun/rsr/cmd.py", line 27, in main
    resource = Gio.resource_load('data/runsqlrun.gresource')
gi._glib.GError: Failed to open file 'data/runsqlrun.gresource': open() failed: No such file or directory

If it's at all applicable, the output of make is:

inkscape -z -f data/icons/runsqlrun.svg -w 128 -e data/icons/128x128/runsqlrun.png
Background RRGGBBAA: ffffff00
Area 0:0:248:248 exported to 128 x 128 pixels (46.4516 dpi)
Bitmap saved as: data/icons/128x128/runsqlrun.png

Strip comments before executing statements

Comments should be removed from queries before they are executed. At least for Oracle it leads to an error (ORA-00911) when a statement ends with a comment.

For example, this works

select 1  -- whatever value you want to retrieve
from dual;

This not:

select 1
from dual;  -- fails

Colors should follow GTK theme

I would have liked for this to take on the theme of the rest of my desktop. Honestly it's the main reason I tried to find a GTK SQL Client. RSR seems to be stuck to a dark theme.

Allow changing font size and keyboard shortcuts

Two core configurations I would love to see implemented (even if just in a config file).

  • Allow changing the font and size.
  • Allow changing keyboard shortcuts.

BTW: I am loving some of the enhancements over Crunchyfrog. Tab complete is awesome! Loading the last editor state on startup is awesome, and the simplistic view is nice.

Format affected rows and query time according to locale for better readability

The number of affected rows and the execution time should be formatted according to the current locale to improve readability. Esp. thousands separators for the number of affected rows is useful when the query returns a lots of rows.

To get started:

>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'en_US')
'en_US'
>>> locale.format("%d", 1255000, grouping=True)
'1,255,000'

Support transaction handling

ATM there's no way to handle transactions or see the transaction state in the UI. The UI should

  • allow to start/commit/abort transactions
  • show changes of transaction states caused by statements

Formatting statements should be a atomic operation.

Steps to reproduce:

  • Place cursor on a statement.
  • Hit Alt+F to format the statement.
  • Hit Ctrl+Z (Undo)

Current behavior: The statement disappears. Hitting Ctrl+Z again brings back unformatted statement.

Expected: Ctrl+Z should undo the formatting.

[sqlite3] DELETE queries not taking affect until COMMIT.

After performing DELETE queries on my SQLite3 DB, I noticed it took affect in the RSR view, but not in the actual database. I thought maybe everything is in a transaction, so I made the query COMMIT; and got the message back "cannot commit, no transaction is active." Despite the error message, this did cause the deleted to propagate to the actual database.

In Crunchyfrog things works as expected.

Statement splitter doesn't work right

When multiple statements are on a single worksheet the splitter seems to have a off-by-one error at some point.

To me it's not clear when this exactly happens, but there must be some statements that confuse the splitter.

Statement splitter doesn't like trailing whitespaces (me neither)

The statement splitter doesn't work right when a statement contains trailing whitespaces. For example ("SPACE#" is actually just blank)

insert into auth_group (name) values ('foo');SPACE#SPACE#SPACE#
insert into auth_group (name) values ('bar');

insert into auth_group (name) values ('baz');

isn't splitted at all. Removing "SPACE#" works.

Additional dependencies required

Running this on Debian (sid), I had to install the following dependencies in addition to the ones mentioned in README:

  • python3-xdg
  • python3-cairo

Small thing, but perhaps worth a tweak to the README.

Error when copying a single cell

The following exception occurs when a single cell is copied:

Traceback (most recent call last):
  File "/home/andi/devel/runsqlrun/rsr/worksheet/completion.py", line 116, in do_populate
    word = self._get_word(context)
  File "/home/andi/devel/runsqlrun/rsr/worksheet/completion.py", line 37, in _get_word
    start_iter = end_iter.copy()
AttributeError: 'tuple' object has no attribute 'copy'

Steps to reproduce:

  • Highlight single cell in results view with mouse
  • Hit Ctrl-C (copy)

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.