Commit Graph

575 Commits (6f61d51b3a5b25fe88eeb8c2622e97872e26a938)
 

Author SHA1 Message Date
Salvo 'LtWorf' Tomaselli 6f61d51b3a changelog 2016-03-02 00:13:04 +07:00
Salvo 'LtWorf' Tomaselli af7901423c C++ redistributable installed automatically.
Rather than forcing the user to click next, and showing them the
scary fail message if the library is already up to date, the
command line parameters make the redistributable require no
interaction.
2016-03-02 00:11:39 +07:00
Salvo 'LtWorf' Tomaselli 262d92290f Prepare for next version
Change the version string everywhere, for the next release
2016-01-06 00:30:10 +07:00
Salvo 'LtWorf' Tomaselli e7a8235d10 Updated copyright date range in d/ 2016-01-04 19:21:57 +07:00
Salvo 'LtWorf' Tomaselli 509fb0a8e7 New debian changelog 2016-01-04 17:10:00 +07:00
Salvo 'LtWorf' Tomaselli ce783a4453 Vertical policy adjusted
Adjusted what happens when the history is hidden.
2016-01-04 12:07:22 +07:00
Salvo 'LtWorf' Tomaselli ba8453c923 Print optimization steps
Prints the various steps on stdout, quite nice to
be able to understand what is happening internally.
2016-01-03 19:47:53 +07:00
Salvo 'LtWorf' Tomaselli ce348149f1 Better code style 2016-01-03 19:43:38 +07:00
Salvo 'LtWorf' Tomaselli 5563e1cafd Do not add query to history if it was the last
Maybe people just press enter twice.

This is the behaviour of bash.
2016-01-03 17:32:34 +07:00
Salvo 'LtWorf' Tomaselli 1dd1298ee0 New optimization: useless projection
If a projection is done on every attribute it is useless and
can be removed.

The new optimization does this.
2016-01-03 17:15:04 +07:00
Salvo 'LtWorf' Tomaselli 17410a0b19 Styled code 2016-01-03 16:55:10 +07:00
Salvo 'LtWorf' Tomaselli d384a902cf Removed redundant check
Assuming that the query is correct, the removed condition must
always be true.
2016-01-03 12:39:48 +07:00
Salvo 'LtWorf' Tomaselli 3b3888e9be New optimization
Turns
        π a,b,c(A) ∪ π a,b,c(B)

    into
        π a,b,c(A ∪ B)

    if A and B are union compatible

Works with union, intersection and difference.
2016-01-03 10:07:23 +07:00
Salvo 'LtWorf' Tomaselli eadcca6da7 Print traceback in case of exception
The text of the exception is pretty much useless alone,
this makes it print the entire traceback.
2016-01-03 10:03:07 +07:00
Salvo 'LtWorf' Tomaselli 0dd2ef2f1d Style 2016-01-03 09:28:45 +07:00
Salvo 'LtWorf' Tomaselli 474bea6ff5 Re-unite query execution functions
For multi-line and single-line. After the change with the assignment
they are basically the same and there was no longer need
to have them separate in two functions.
2016-01-03 09:18:31 +07:00
Salvo 'LtWorf' Tomaselli 03ae3e0bab s/outher join/outer join/ 2016-01-03 09:05:15 +07:00
Salvo 'LtWorf' Tomaselli 2ecf31bd57 Remove TODO file
I am tracking things with github bugs now
2016-01-03 09:04:23 +07:00
Salvo 'LtWorf' Tomaselli faf636f61d Changelog 2016-01-02 16:26:09 +07:00
Salvo 'LtWorf' Tomaselli 67db598b02 Shortcut to show relation
Pressing space on a selected relation shows it.

I wanted to use 'Enter' but it doesn't work.

This closes #5
2016-01-02 16:24:57 +07:00
Salvo 'LtWorf' Tomaselli 746ae6af09 Can hide history box
If it bothers you, it is possible to hide the history box.
2016-01-02 16:11:20 +07:00
Salvo 'LtWorf' Tomaselli 6315bebc61 Fix crash in case of empty history
Without that check, an empty history causes a crash
2016-01-02 15:59:02 +07:00
Salvo 'LtWorf' Tomaselli 8ccf4d51a4 Shortcuts to run and clear queries 2016-01-02 15:39:31 +07:00
Salvo 'LtWorf' Tomaselli 2a4bcd2a8b New shortcuts for optimization 2016-01-02 15:34:56 +07:00
Salvo 'LtWorf' Tomaselli a30aac5f5b Remove result text box
It was not really easy to write the name for the result
in a separate box, and it would create a lot of garbage
results, by creating a new one per every query.

Now single lines queries can contain assignments, and if not
a default relation named 'last_' is used to hold the last result.
2016-01-02 15:28:17 +07:00
Salvo 'LtWorf' Tomaselli fd1e4610fa Use split_query function
Instead of having it duplicated there
2016-01-02 15:27:51 +07:00
Salvo 'LtWorf' Tomaselli e3877a4682 Added function to split an assignment expression
In the UI, a common pattern was to check if a query was
prefixed by an assignment and in that case, assign the result
to the given name.

This function puts this in a common place, so it can be used from
all the parts where it is needed.
2016-01-02 15:25:43 +07:00
Salvo 'LtWorf' Tomaselli 53b158d25e Changes 2016-01-02 12:37:20 +07:00
Salvo 'LtWorf' Tomaselli e017949f7d Navigate history with arrows
In single line query mode, the history can be navigated
in a way that is somewhat similar to the shell.
2016-01-02 12:36:28 +07:00
Salvo 'LtWorf' Tomaselli 99b3a10b68 Hopefully improved the README
It was a bit aggressive, had a typo
2016-01-01 12:35:12 +07:00
Salvo 'LtWorf' Tomaselli c795acad97 s/outher join/outer join/ 2015-12-31 18:10:52 +07:00
Salvo 'LtWorf' Tomaselli 7acc0d19d0 Changed the blur thing with a simple label
It was a bit buggy and was not blurring all the widgets, or
not reverting the blur properly. Probably best to just show a
label instead.

Still, the proper solution would probably be to do the processing
in a separate thread.
2015-12-31 18:07:23 +07:00
Salvo 'LtWorf' Tomaselli 76cdfe7d06 Function to add shortcuts via code
I plan on adding a few more.
2015-12-31 14:29:12 +07:00
Salvo 'LtWorf' Tomaselli 950a2273c3 New query optimization
A * B ∪ A * C = A * (B ∪ C)
2015-12-31 14:26:28 +07:00
Salvo 'LtWorf' Tomaselli 5c2ff5f844 Added shortcuts for the operators 2015-12-31 12:58:47 +07:00
Salvo 'LtWorf' Tomaselli 239e0e58dd Blurs UI while processing
Before the processing of a query starts, it will blur the UI.

This gives feedback to the user that something is happening, and is
simple to implement because I am too lazy to move the processing in
a separate thread.
2015-12-21 00:54:05 +07:00
Salvo 'LtWorf' Tomaselli c8c894bb7b Removed useless line 2015-12-06 13:47:56 +07:00
Salvo 'LtWorf' Tomaselli be8230d54a Align query editing box with relation viewer
Not sure of what the problem was, probably some layout or frame that
had spacing.

Replaced the whole mess with a stacked widget instead.

close #8
2015-11-20 17:06:59 +07:00
Salvo 'LtWorf' Tomaselli cd6bd42a2b Use normal strings in intermediate steps
This uses the CallableString object only in the final step and not
during all the intermediate ones.

Since str is a native object, it is faster to use than a normal
object.

This is a very marginal optimization that will not yield any
gains :)
2015-11-20 15:50:09 +07:00
Salvo 'LtWorf' Tomaselli c2a772e797 Compile selection expression
When running a selection, compiling the expression into a code object
so that it does not need to be re-parsed per every iteration.

Since it saves one parse per iteration, the gains become more
noticeable as the size of the relations grow.
2015-11-20 15:48:20 +07:00
Salvo 'LtWorf' Tomaselli a8c1b2a463 Revert copy on write optimization
In case of multiple renames, all of the resulting relations will point
to the same data, so writing on one and marking its only known copy
as writable would be incorrect.

For this to work, all the references should be kown to all the other
instances.

It is probably not worth to implement it.

Implemented test for the update
2015-11-18 12:15:03 +07:00
Salvo 'LtWorf' Tomaselli 5073567757 Change how python tests are executed
Require them to have assert rather than testing the
result variables set.

This makes for way simpler code.

Now also prints stacktrace to know where the problem occurred.
2015-11-18 12:05:56 +07:00
Salvo 'LtWorf' Tomaselli 78a2e63e14 Raise TypeError rather than generic Exception 2015-11-18 10:38:41 +07:00
Salvo 'LtWorf' Tomaselli 521ffd5d41 Reduce amount of useless copies
In case of a rename, the original relation and the resulting relations
are pointing to the same set.

In case of functions that change the relation, such as insert, a copy is
created to be able to write on it. But when writing on the other relation
a new copy would have been made too.

This fixes it, now when changing one relation, the other is marked as
writable as well.
2015-11-18 00:05:01 +07:00
Salvo 'LtWorf' Tomaselli ff3a5935fc Use _make_writable also in delete function
This way the _make_writable can be changed in one place.
2015-11-17 23:52:26 +07:00
Salvo 'LtWorf' Tomaselli 1e464d9d4c Simplified update function
Now avoids duplicating code.
2015-11-17 23:50:58 +07:00
Salvo 'LtWorf' Tomaselli f0608c7212 Simply __str__ function 2015-11-17 15:44:59 +07:00
Salvo 'LtWorf' Tomaselli 90be4421c5 Better suggestion on error
Relational fails to run if make was not executed, this
suggests to run it.
2015-11-11 17:04:47 +07:00
Salvo 'LtWorf' Tomaselli f86baa1d57 Removed unused imports 2015-11-11 17:02:50 +07:00
Salvo 'LtWorf' Tomaselli 3012a08ff3 Removed unused variable 2015-11-11 17:01:52 +07:00