query.py

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

query.py

Gerald Britton-2
Hi -- can someone please tell me how to invoke this module?

--
Gerald Britton

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: query.py

Gary Burton

Hello Gerald

> Hi -- can someone please tell me how to invoke this module?
>
> --
> Gerald Britton

Where is it? I can't find it.

Bye

Gary



     

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: query.py

Benny Malengier
In reply to this post by Gerald Britton-2
locate query.py returns nothing here.
Is it in subversion? Or did you mistype?

Benny

2009/6/15 Gerald Britton <[hidden email]>:

> Hi -- can someone please tell me how to invoke this module?
>
> --
> Gerald Britton
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: query.py

DS Blank
In reply to this post by Gerald Britton-2
On 6/15/09, Gerald Britton <[hidden email]> wrote:
> Hi -- can someone please tell me how to invoke this module?

Gerald,

If you are referring to Query.py in trunk, then that is an
experimental QuickReport that is called from the QueryGramplet (which
used to be in DefaultGramplets). When I broke those up into individual
files, I didn't do it (as I stopped working on this experiment).

The experiment was largely a failure; the code takes way too long to
run to be very useful. But it did spur me on to continue work on a
real SQL exporter. You can get some useful data, though, through this
code.

So, if this is what you are interested in, and you want to try that
code, here is a QueryGramplet for GRAMPS 3.1, which some instructions
on using it below:

# -------------
from DataViews import register, Gramplet
from TransUtils import sgettext as _
from QuickReports import run_quick_report_by_name
from PythonGramplet import PythonGramplet
class QueryGramplet(PythonGramplet):
    def init(self):
        self.prompt = "$"
        self.set_tooltip(_("Enter SQL query"))
        # GUI setup:
        self.gui.textview.set_editable(True)
        self.set_text("Structured Query Language\n%s " % self.prompt)
        self.gui.textview.connect('key-press-event', self.on_key_press)
    def process_command(self, command):
        retval = run_quick_report_by_name(self.gui.dbstate,
                                          self.gui.uistate,
                                          'query',
                                          command)
        return retval
register(type="gramplet",
         name="Query Gramplet",
         tname=_("Query Gramplet"),
         version="1.0.0",
         gramps="3.1.0",
         height=200,
         content = QueryGramplet,
         title=_("Query"),
         )
# -------------

When you run the QueryGramplet, you get a SQL-like prompt. You can
enter things like:

$ select * from people;
$ select name, gender from people;
$ select name, gender from people where gender == "male";

This was going to take a lot of work to get all of the other info, and
I had no plans to create a general SQL engine, so that's about all
that it does.

If this isn't what you were asking about, sorry!

-Doug

> --
> Gerald Britton
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: query.py

Gerald Britton-2
Yes that is what I meant. I stumbled upon it today and wanted to try
it out but couldn't see how.

Do we still need it?



On 6/15/09, Doug Blank <[hidden email]> wrote:

> On 6/15/09, Gerald Britton <[hidden email]> wrote:
>> Hi -- can someone please tell me how to invoke this module?
>
> Gerald,
>
> If you are referring to Query.py in trunk, then that is an
> experimental QuickReport that is called from the QueryGramplet (which
> used to be in DefaultGramplets). When I broke those up into individual
> files, I didn't do it (as I stopped working on this experiment).
>
> The experiment was largely a failure; the code takes way too long to
> run to be very useful. But it did spur me on to continue work on a
> real SQL exporter. You can get some useful data, though, through this
> code.
>
> So, if this is what you are interested in, and you want to try that
> code, here is a QueryGramplet for GRAMPS 3.1, which some instructions
> on using it below:
>
> # -------------
> from DataViews import register, Gramplet
> from TransUtils import sgettext as _
> from QuickReports import run_quick_report_by_name
> from PythonGramplet import PythonGramplet
> class QueryGramplet(PythonGramplet):
>     def init(self):
>         self.prompt = "$"
>         self.set_tooltip(_("Enter SQL query"))
>         # GUI setup:
>         self.gui.textview.set_editable(True)
>         self.set_text("Structured Query Language\n%s " % self.prompt)
>         self.gui.textview.connect('key-press-event', self.on_key_press)
>     def process_command(self, command):
>         retval = run_quick_report_by_name(self.gui.dbstate,
>                                           self.gui.uistate,
>                                           'query',
>                                           command)
>         return retval
> register(type="gramplet",
>          name="Query Gramplet",
>          tname=_("Query Gramplet"),
>          version="1.0.0",
>          gramps="3.1.0",
>          height=200,
>          content = QueryGramplet,
>          title=_("Query"),
>          )
> # -------------
>
> When you run the QueryGramplet, you get a SQL-like prompt. You can
> enter things like:
>
> $ select * from people;
> $ select name, gender from people;
> $ select name, gender from people where gender == "male";
>
> This was going to take a lot of work to get all of the other info, and
> I had no plans to create a general SQL engine, so that's about all
> that it does.
>
> If this isn't what you were asking about, sorry!
>
> -Doug
>
>> --
>> Gerald Britton
>>
>> ------------------------------------------------------------------------------
>> Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensing option that enables unlimited
>> royalty-free distribution of the report engine for externally facing
>> server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> Gramps-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>>
>

--
Sent from my mobile device

Gerald Britton

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: query.py

DS Blank
On Mon, Jun 15, 2009 at 8:02 PM, Gerald Britton <[hidden email]> wrote:
Yes that is what I meant. I stumbled upon it today and wanted to try
it out but couldn't see how.

Do we still need it?

No, I can remove it.

-Doug

 

On 6/15/09, Doug Blank <[hidden email]> wrote:
> On 6/15/09, Gerald Britton <[hidden email]> wrote:
>> Hi -- can someone please tell me how to invoke this module?
>
> Gerald,
>
> If you are referring to Query.py in trunk, then that is an
> experimental QuickReport that is called from the QueryGramplet (which
> used to be in DefaultGramplets). When I broke those up into individual
> files, I didn't do it (as I stopped working on this experiment).
>
> The experiment was largely a failure; the code takes way too long to
> run to be very useful. But it did spur me on to continue work on a
> real SQL exporter. You can get some useful data, though, through this
> code.
>
> So, if this is what you are interested in, and you want to try that
> code, here is a QueryGramplet for GRAMPS 3.1, which some instructions
> on using it below:
>
> # -------------
> from DataViews import register, Gramplet
> from TransUtils import sgettext as _
> from QuickReports import run_quick_report_by_name
> from PythonGramplet import PythonGramplet
> class QueryGramplet(PythonGramplet):
>     def init(self):
>         self.prompt = "$"
>         self.set_tooltip(_("Enter SQL query"))
>         # GUI setup:
>         self.gui.textview.set_editable(True)
>         self.set_text("Structured Query Language\n%s " % self.prompt)
>         self.gui.textview.connect('key-press-event', self.on_key_press)
>     def process_command(self, command):
>         retval = run_quick_report_by_name(self.gui.dbstate,
>                                           self.gui.uistate,
>                                           'query',
>                                           command)
>         return retval
> register(type="gramplet",
>          name="Query Gramplet",
>          tname=_("Query Gramplet"),
>          version="1.0.0",
>          gramps="3.1.0",
>          height=200,
>          content = QueryGramplet,
>          title=_("Query"),
>          )
> # -------------
>
> When you run the QueryGramplet, you get a SQL-like prompt. You can
> enter things like:
>
> $ select * from people;
> $ select name, gender from people;
> $ select name, gender from people where gender == "male";
>
> This was going to take a lot of work to get all of the other info, and
> I had no plans to create a general SQL engine, so that's about all
> that it does.
>
> If this isn't what you were asking about, sorry!
>
> -Doug
>
>> --
>> Gerald Britton
>>
>> ------------------------------------------------------------------------------
>> Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensing option that enables unlimited
>> royalty-free distribution of the report engine for externally facing
>> server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> Gramps-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>>
>

--
Sent from my mobile device

Gerald Britton


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel