Обсуждение: First public pre-alpha release of GQB (Graphical Query Builder) for pgAdmin

Поиск
Список
Период
Сортировка

First public pre-alpha release of GQB (Graphical Query Builder) for pgAdmin

От
"Luis Ochoa"
Дата:
Hi everyone,

I have been working on improve my Google Summer of Code Project: http://wiki.postgresql.org/wiki/Gsoc08-querybuilder  for a while, and today I'm going to release what I believe it's the first public pre-alpha release, as you notice this release is for testing only an i'ts provided with no warranty :)

Now with the project you can:

0. Create a graphical model of a query sentence. (to add a table just double click on it on the left tree, tables are added at same place please move to other position by drag & drop from the title)
1. Create some simple queries involving joins (only equality joins right now), only drag and drop column from one table to another
2. Order the columns in the projection part of sentence (Select x,y,z...), and add columns alias in a grid
3. Add some restrictions (not validate content yet, a parser should be done in next days)
4. Create synonymous for tables just double click on table title an write synonymous on dialog.

I'm hoping for feedback, any ideas, suggestions or bug reporst are important to improve next releases.

Mini-FAQ
Where is located GQB inside pgAdmin?
At SQL Editor in a top tab you can choose between normal editor & gqb.

How looks GQB?
You can check this post at my project blog.
http://gsoc2008-gqb.blogspot.com/2008/07/first-public-pre-alpha-release-of-gqb.html

Can I try it without applying a patch and compiling it?
Yes, download binary (sorry binary for windows only this time) at rapidshare:
http://rapidshare.com/files/132757130/prealpha-test-pgadmin-gqb-july-27.patch.zip.html

Where is located the patch?
http://svn.assembla.com/svn/vsqlbuilder/Jul/27/prealpha-test-gqb-july-27.patch

Regards,
Luis.

Re: First public pre-alpha release of GQB (Graphical Query Builder) for pgAdmin

От
Guillaume Lelarge
Дата:
Hi,

Luis Ochoa a écrit :
> I have been working on improve my Google Summer of Code Project:
> http://wiki.postgresql.org/wiki/Gsoc08-querybuilder  for a while, and
> today I'm going to release what I believe it's the first public
> pre-alpha release, as you notice this release is for testing only an
> i'ts provided with no warranty :)
>

First, the patch doesn't apply cleanly :

patching file pgadmin/include/frm/frmQuery.h
Hunk #2 FAILED at 19.
1 out of 6 hunks FAILED -- saving rejects to file
pgadmin/include/frm/frmQuery.h.rej

and

patching file pgadmin/pgAdmin3.vcproj
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 2317.
Hunk #3 FAILED at 3042.
3 out of 3 hunks FAILED -- saving rejects to file
pgadmin/pgAdmin3.vcproj.rej

Then, it didn't build as is. I had to modify
pgadmin/include/gqb/gqbViewController.h because of:

../pgadmin/include/gqb/gqbViewController.h:60: erreur: extra
qualification «gqbController::» on member «addRestriction»

I also had this issue:

gqbViewPanels.o: In function `wxGridCellComboBoxRenderer':

/home/guillaume/freeprojects/svn.pgadmin.org/trunk/pgadmin3.gsoc2/pgadmin/../pgadmin/include/gqb/gqbRestGridTable.h:56:

undefined reference to `vtable for wxGridCellComboBoxRenderer'

gqbViewPanels.o: In function `wxGridCellButtonRenderer':

/home/guillaume/freeprojects/svn.pgadmin.org/trunk/pgadmin3.gsoc2/pgadmin/../pgadmin/include/gqb/gqbRestGridTable.h:73:

undefined reference to `vtable for wxGridCellButtonRenderer'

gqbView.o: In function `gqbView':

/home/guillaume/freeprojects/svn.pgadmin.org/trunk/pgadmin3.gsoc2/pgadmin/./gqb/gqbView.cpp:65:
undefined reference to
`gqbRestGridTable::gqbRestGridTable(gqbRestrictions*)'

/home/guillaume/freeprojects/svn.pgadmin.org/trunk/pgadmin3.gsoc2/pgadmin/./gqb/gqbView.cpp:65:
undefined reference to
`gqbRestGridTable::gqbRestGridTable(gqbRestrictions*)'

It means you forgot this line
     $(srcdir)/gqb/gqbRestGridTable.cpp \
in pgadmin/gqb/module.mk file.

So I added this line and I got the following error messages:
./gqb/gqbRestGridTable.cpp: In member function «virtual void
wxFastComboEditor::BeginEdit(int, int, wxGrid*)»:
./gqb/gqbRestGridTable.cpp:438: erreur: «GtkCombo» was not declared in
this scope
./gqb/gqbRestGridTable.cpp:438: erreur: «combo» was not declared in this
scope
./gqb/gqbRestGridTable.cpp:438: erreur: «GTK_COMBO» was not declared in
this scope
./gqb/gqbRestGridTable.cpp:441: erreur: «GdkEventButton» was not
declared in this scope
./gqb/gqbRestGridTable.cpp:441: erreur: expected `;' before «event»
./gqb/gqbRestGridTable.cpp:442: erreur: «event» was not declared in this
scope
./gqb/gqbRestGridTable.cpp:443: erreur: invalid use of incomplete type
«struct _GtkWidget»
/opt/wxgtk-2.8/include/wx-2.8/wx/defs.h:2806: erreur: forward
declaration of «struct _GtkWidget»
./gqb/gqbRestGridTable.cpp:443: erreur: «gdk_window_ref» was not
declared in this scope
./gqb/gqbRestGridTable.cpp:449: erreur: «GDK_CORE_POINTER» was not
declared in this scope
./gqb/gqbRestGridTable.cpp:450: erreur: «GDK_BUTTON_PRESS» was not
declared in this scope
./gqb/gqbRestGridTable.cpp:451: erreur: «GDK_SOURCE_MOUSE» was not
declared in this scope
./gqb/gqbRestGridTable.cpp:453: erreur: invalid use of incomplete type
«struct _GtkWidget»
/opt/wxgtk-2.8/include/wx-2.8/wx/defs.h:2806: erreur: forward
declaration of «struct _GtkWidget»
./gqb/gqbRestGridTable.cpp:456: erreur: «GdkEvent» was not declared in
this scope
./gqb/gqbRestGridTable.cpp:456: erreur: expected primary-expression
before «)» token
./gqb/gqbRestGridTable.cpp:456: erreur: «gtk_widget_event» was not
declared in this scope
./gqb/gqbRestGridTable.cpp:457: erreur: invalid use of incomplete type
«struct _GtkWidget»
/opt/wxgtk-2.8/include/wx-2.8/wx/defs.h:2806: erreur: forward
declaration of «struct _GtkWidget»
./gqb/gqbRestGridTable.cpp:457: erreur: «gdk_window_unref» was not
declared in this scope
./gqb/gqbRestGridTable.cpp:458: erreur: «gtk_events_pending» was not
declared in this scope
./gqb/gqbRestGridTable.cpp:459: erreur: «gtk_main_iteration» was not
declared in this scope

Why do you use a GtkCombo instead of the wxComboBox?

Can you provide a fixed patch? Thanks.

Regards.


--
Guillaume.
  http://www.postgresqlfr.org
  http://dalibo.com

Re: First public pre-alpha release of GQB (Graphical Query Builder) for pgAdmin

От
"Dave Page"
Дата:
Hi Luis

On Sun, Jul 27, 2008 at 6:13 AM, Luis Ochoa <ziul1979@gmail.com> wrote:
>
> Where is located the patch?
> http://svn.assembla.com/svn/vsqlbuilder/Jul/27/prealpha-test-gqb-july-27.patch

I'm just going to list all the issues I found here so you can work
through them easily. I'm testing on a Mac today, and feeling
particularly pedantic :-p.

- The patch failed to apply frmQuery.h. During manual application, I
found that you have app headers inbetween wx headers (wx headers
should always be first), and a wx header quoted with " " instead of <
>.

- Some compilation warnings:

./frm/frmQuery.cpp: In constructor 'frmQuery::frmQuery(frmMain*, const
wxString&, pgConn*, const wxString&, const wxString&)':
./frm/frmQuery.cpp:368: warning: unused variable 'view'
./frm/frmQuery.cpp: In constructor 'frmQuery::frmQuery(frmMain*, const
wxString&, pgConn*, const wxString&, const wxString&)':
./frm/frmQuery.cpp:368: warning: unused variable 'view'
./frm/frmQuery.cpp: In member function 'void
frmQuery::OnChangeConnection(wxCommandEvent&)':
./frm/frmQuery.cpp:881: warning: cannot pass objects of non-POD type
'class wxString' through '...'; call will abort at runtime
./frm/frmQuery.cpp: In member function 'void
frmQuery::OnTest3(wxNotebookEvent&)':
./frm/frmQuery.cpp:1027: warning: cannot pass objects of non-POD type
'class wxString' through '...'; call will abort at runtime
./frm/frmQuery.cpp: In member function 'void
frmQuery::OnChangeConnection(wxCommandEvent&)':
./frm/frmQuery.cpp:881: warning: cannot pass objects of non-POD type
'class wxString' through '...'; call will abort at runtime
./frm/frmQuery.cpp: In member function 'void
frmQuery::OnTest3(wxNotebookEvent&)':
./frm/frmQuery.cpp:1027: warning: cannot pass objects of non-POD type
'class wxString' through '...'; call will abort at runtime

(The last four *will* cause crashes - normally you just add .c_str()
to any wxString arguments passed as arguments to variadic functions).

<hits brick wall>

Following that, I ran into the same errors as Guillaume. Please supply
an updated patch, that uses only wxWidgets controls (using GTK classes
definitely isn't going to work on Mac).

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

Re: First public pre-alpha release of GQB (Graphical Query Builder) for pgAdmin

От
"Luis Ochoa"
Дата:
Hi, I solve some issues relating to compiling on non-windows plataforms. I eliminate the GTK  code and use only wxwidgets code right now, ok. Now I tested this new patch on linux debian testing & windows XP.

Still there is an issue while applying the patch (fuzzy now), with frmQuery.h, I try to fix it but I can't still looking for solution.

Because this patch is created with visual studio in spanish and for some reason the people of M$ change somethings in the .sln file that don't allow to patch between different idioms in my case, but that probably can be fixed in some way, If apply on windows & compile with visual studio, please do this two steps:
1. add new filter at pgAdmin3 called gqb and then add content of folder pgadmin\gqb
2. add new filter at pgAdmin3\include called gqb and then add content of folder pgadmin\include\gqb

Added right click for delete joins & tables.

But still continue working on fixing feedback's request, because this I don't create a binary just a patch for only testing at linux / Mac looking for some compilations errors if any :(

Thanks for your patience & sorry for the delay.

url:  http://svn.assembla.com/svn/vsqlbuilder/Aug/04/linuxwin_tested_aug04.patch


Waiting for feedback, to improve this add-on to pgadmin. Thanks for your help.

Note: some new issues appears after fixing linux related problems with workarounds, like the fixed size of tables tree in the GQB but I'm working on fixing this kind of things...

Regards, Luis.

Re: First public pre-alpha release of GQB (Graphical Query Builder) for pgAdmin

От
"Dave Page"
Дата:
[Please keep list message on-list]

On Tue, Aug 5, 2008 at 1:35 PM, Luis Ochoa <ziul1979@gmail.com> wrote:

>> - The tables are *really* small on OSX. See screenshot 2. Consider
>> using the user-configurable font or SQL font options.
>
> What do you think about allowing user just to change font size?
> In what part of the menu you think this should be add?

That's why I suggested using the existing configurable options. See:

wxFont sysSettings::GetSystemFont();
wxFont sysSettings::GetSQLFont();

The system font is the one used in most controls, the SQL font is used
in ctlSQLBox's (and is usually fixed-width). Both have sensible
defaults on all platforms.

>> - You need to tweak the default views to enlarge the toolbar size on
>> frmQuery to account for the additional button (see frmQuery.h iirc).
>> The button should be placed in a more appropriate place - certainly
>> not after the help button which is always last.
>
> Ok, but after complete all other things [ something like lower priority :)
> ] my list of todo things is really big :'(

Yup, of course.

>> Should look more like:
>>
>> SELECT
>>  *
>> FROM
>>  pg_class,
>>  pg_attribute
>> WHERE
>>  pg_attribute.attrelid = pg_class.relname AND
>>  pg_class.relname = 'pg_class';
>
> Ok, I believe that the option to generate joins of kind "a.x=b.x"   or   "a
> join b on (a.x=b.x)" should be added to.

Yes, that syntax will be needed for left/right outer joins etc. - my
comment was more about tidying the general formatting to be more in
line with what we have elsewhere though.

>> - The 'Selected Columns' and 'Columns Criteria' tabs still need to be
>> moved onto the GQB tab (as you already know :-) ).
>
> Yes, but afraid of new bugs on linux/mac when this will be done :'(.... but
> have to be done...

Yes - oh, and that reminds me - the vertical splitter only resizes the
drawing area, not the treeview. I guess this is the splitter bug you
mentioned in you earlier email? You should be able to get that to work
OK - we used to use splitters everywhere before changing to wxAUI.

>> - The column headers on the two tabs are of different heights.
>
> In SQL Editor | GQB tabs?
>
> or in bottom tabs?

Sorry, the column headers of the grids on the bottom tabs.

/D

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com