Commit Graph

636 Commits

Author SHA1 Message Date
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 +01: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 +01: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 +01:00
Salvo 'LtWorf' Tomaselli
78a2e63e14 Raise TypeError rather than generic Exception 2015-11-18 10:38:41 +01: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 +01: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 +01:00
Salvo 'LtWorf' Tomaselli
1e464d9d4c Simplified update function
Now avoids duplicating code.
2015-11-17 23:50:58 +01:00
Salvo 'LtWorf' Tomaselli
f0608c7212 Simply __str__ function 2015-11-17 15:44:59 +01: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 +01:00
Salvo 'LtWorf' Tomaselli
f86baa1d57 Removed unused imports 2015-11-11 17:02:50 +01:00
Salvo 'LtWorf' Tomaselli
3012a08ff3 Removed unused variable 2015-11-11 17:01:52 +01:00
Salvo 'LtWorf' Tomaselli
bdddb29b64 Removed test code to run the optimizer interactively 2015-11-11 16:36:14 +01:00
Salvo 'LtWorf' Tomaselli
7b26423d90 Typo in variable name 2015-11-11 16:35:49 +01:00
Salvo 'LtWorf' Tomaselli
5f1cccbd5c Removed windows fonts
They are included in new windows installations
2015-11-11 16:35:22 +01:00
Salvo 'LtWorf' Tomaselli
82e51e1bf0 Refreshed manpages 2015-11-06 16:13:36 +01:00
Salvo 'LtWorf' Tomaselli
87e2c76468 Silent mode if using scripts
When using a script, the command line mode prints less debug output
and less things in general, to avoid cluttering the output with
unwanted things.
2015-11-06 16:03:58 +01:00
Salvo 'LtWorf' Tomaselli
643adf4d0a Simplify some redundant code 2015-11-06 15:26:26 +01:00
Salvo 'LtWorf' Tomaselli
b5dfeaa629 Merged debian changes from revision -2 2015-10-23 17:10:41 +02:00
Salvo 'LtWorf' Tomaselli
d5c5707213 load/save improvements 2015-10-10 02:10:33 +02:00
Salvo 'LtWorf' Tomaselli
be4217dec9 removed outdated comment 2015-10-10 02:02:35 +02:00
Salvo 'LtWorf' Tomaselli
7f08ca9133 Ctrl+C in the terminal, will kill the GUI
It will abruptly kill, so settings will not be
saved.
2015-10-09 11:33:19 +02:00
Salvo 'LtWorf' Tomaselli
0d9d5114bd changelog 2015-10-09 11:31:52 +02:00
Salvo 'LtWorf' Tomaselli
36145ca399 Check if files exist before loading form
That way if it will terminate, it will do so earlier
2015-10-09 11:28:54 +02:00
Salvo 'LtWorf' Tomaselli
fe774f1771 Improve handling of non existant files 2015-10-09 10:38:53 +02:00
Salvo 'LtWorf' Tomaselli
e089e48a37 Install manpages from Makefile
Fixes: #3

Rather than relying on the debian helpers to install the manpages, use the
install target.
2015-10-09 08:52:42 +02:00
Salvo 'LtWorf' Tomaselli
38306a8bfb Correct name in relational-cli manpage 2015-10-09 08:31:46 +02:00
Salvo 'LtWorf' Tomaselli
0bd4ca8df5 Removed useless file 2015-10-04 00:35:36 +02:00
Salvo 'LtWorf' Tomaselli
e24e757342 Moved most of install logic to makefile
Makefile has again a make install target. The install targets
are split because it is easier for the rules file to install
the files for the different packages inside different destinations
directly.
2015-10-04 00:35:29 +02:00
Salvo 'LtWorf' Tomaselli
b538fff8b0 Cleanup generated files
Cleans the generated files in the clean phase, rather than in the
dist one.
2015-09-29 13:55:50 +02:00
Salvo 'LtWorf' Tomaselli
f5ef1027d0 Refactored main window creation
The main window was created in a somewhat stupid way, that required
multiple steps to be taken from the main module.

Now it's all in one call.
2015-09-29 12:47:20 +02:00
Salvo 'LtWorf' Tomaselli
7d0dee2b30 Cleaned up the Makefile
There were leftovers of the SVN days and of the times when
a .app could be generated
2015-09-29 12:45:58 +02:00
Salvo 'LtWorf' Tomaselli
74f3a67716 Updated debian package stuff 2015-09-15 23:38:51 +02:00
Salvo 'LtWorf' Tomaselli
a9daf8544c Prepare for next release 2015-09-15 01:58:17 +02:00
Salvo 'LtWorf' Tomaselli
fc3ed21e92 Improved windows distutils file
Automatically adds the platforms dll, removing a manual step.
2015-09-15 01:01:40 +02:00
Salvo 'LtWorf' Tomaselli
6fad0cdf68 Solves mysterious issue
When running relational as an .exe file generated by
py2exe, that line might give an exception. Because of
reasons.

I don't know what the hell is going on and I don't care.
2015-09-14 19:45:09 +02:00
Salvo 'LtWorf' Tomaselli
38f9ced894 Fixed tab order
After the restyle, the order was messed up.
2015-09-12 11:12:58 +02:00
Salvo 'LtWorf' Tomaselli
449b230891 Updated innosetup script
The [run] section was incorrect, and eventually I am using default
windows fonts (hopefully).
2015-09-12 11:12:58 +02:00
Salvo 'LtWorf' Tomaselli
66b5575d41 Better readme 2015-09-11 14:20:08 +02:00
Salvo 'LtWorf' Tomaselli
21cd1eec45 Delete compiled file
That file is compiled and must be cleaned.
2015-09-11 14:13:24 +02:00
Salvo 'LtWorf' Tomaselli
db59cb588b Installs icon for .desktop file
Rather than hoping that the icon is already present. Install our own
copy, that can also be themed.
2015-09-11 14:05:23 +02:00
Salvo 'LtWorf' Tomaselli
7e34258f3b Remove install and uninstall from Makefile
They were completely abandoned. I install by creating debian package.
2015-09-11 14:02:55 +02:00
Salvo 'LtWorf' Tomaselli
732024de0e Use resource file
Use Qt resource files, compile it to Python to obtain a window that
has an icon!

Finally!

It is still using the Oxygen icon for Database, since I have nothing
better to use.
2015-09-11 13:57:34 +02:00
Salvo 'LtWorf' Tomaselli
0f4cc1ab94 Changelog
Move the impressive stuff up
2015-09-11 12:42:18 +02:00
Salvo 'LtWorf' Tomaselli
7a85b77f50 Save state of splitter in GUI
The splitters are not stored as part of the window's state, so
store it separately.
2015-09-11 12:41:33 +02:00
Salvo 'LtWorf' Tomaselli
c3edd0190a Add make step in debian/rules
Fix the creation of the debian package to perform the
extra step.
2015-09-11 12:40:17 +02:00
Salvo 'LtWorf' Tomaselli
c47823616a Do not ship compiled files
Remove the compiled files from the source.

Running from sources will require an extra make step that will generate
the necessary ui modules.
2015-09-11 12:33:58 +02:00
Salvo 'LtWorf' Tomaselli
41bb45b445 Redesigned UI
UI redesign.

Use Dock widgets for the toolbars, change various layouts to make the overall
UI smaller.
2015-09-11 12:26:37 +02:00
Salvo 'LtWorf' Tomaselli
d597076038 Subtle bug that occurred selecting after a join
Outer joins add the placeholder '---' that is used as some sort of NULL
value.

However select operations on such relations would always fail, because
relations are supposed to only contain values of class rstring, and
the placeholder was added as a regular string.

As a consequence, automatic casting would always fail, and the select
would always raise an exception.

Added a new test case with this specific case in mind.
2015-09-10 12:19:51 +02:00
Salvo 'LtWorf' Tomaselli
f7ac34b761 Fix exception
The reported exception will look uglier but will work for any kind of
weird tokenization that occurred.
2015-09-10 10:13:00 +02:00
Salvo 'LtWorf' Tomaselli
df5ff35aa9 Changelog 2015-09-09 17:33:15 +02:00