Chris Bennett | 1 Jul 2011 01:32
Picon
Favicon

rookie question, func->SelectResults

SQLObject rookie here.


Say i have a function on my MySQL database that returns a new table.
so i access sqlbuilder.func.myfunc() by:
query = myconn.sqlrepr(sqlbuilder.Select(sqlbuilder.func.myfunc()))
results = myconn.queryAll(query)
and results is a tuple of tuples
Is there a way to have that table be returned as a SelectResults class so i can access its attrs and everything?

This may be a stupid question or already answered but i thought i would ask. Thank you very much

Chris Bennett
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
Oleg Broytman | 1 Jul 2011 11:53
X-Face
Favicon
Gravatar

Re: func->SelectResults

hi!

On Thu, Jun 30, 2011 at 06:32:27PM -0500, Chris Bennett wrote:
> Say i have a function on my MySQL database that returns a new table.
> so i access sqlbuilder.func.myfunc() by:
> query = myconn.sqlrepr(sqlbuilder.Select(sqlbuilder.func.myfunc()))
> results = myconn.queryAll(query)
> and results is a tuple of tuples 
> Is
>  there a way to have that table be returned as a SelectResults class so
>  i can access its attrs and everything?

   There is no currently. In TODO http://sqlobject.org/TODO.html there
is an item

Expression columns - in SELECT but not in INSERT/UPDATE. Something like this:

class MyClass(SQLObject):
    function1 = ExpressionCol(func.my_function(MyClass.q.col1))
    function2 = ExpressionCol('sum(col2)')

But we don't have any code yet.

Oleg.
--

-- 
     Oleg Broytman            http://phdru.name/            phd <at> phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
Oleg Broytman | 1 Jul 2011 17:27
X-Face
Favicon
Gravatar

SQLObject 1.1.1

Hello!

I'm pleased to announce version 1.1.1, a minor documentation update of branch
1.1 of SQLObject.

What is SQLObject
=================

SQLObject is an object-relational mapper.  Your database tables are described
as classes, and rows are instances of those classes.  SQLObject is meant to be
easy to use and quick to get started with.

SQLObject supports a number of backends: MySQL, PostgreSQL, SQLite,
Firebird, Sybase, MSSQL and MaxDB (also known as SAPDB).

Where is SQLObject
==================

Site:
http://sqlobject.org

Development:
http://sqlobject.org/devel/

Mailing list:
https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss

Archives:
http://news.gmane.org/gmane.comp.python.sqlobject

Download:
http://cheeseshop.python.org/pypi/SQLObject/1.1.1

News and changes:
http://sqlobject.org/News.html

What's New
==========

Features & Interface
--------------------

* Parsing sqlobject.__doc__ for version number is declared obsolete. Use
  sqlobject.version or version_info.

* Documented sqlmeta.dbEncoding and connection.dbEncoding.

For a more complete list, please see the news:
http://sqlobject.org/News.html

Oleg.
--

-- 
     Oleg Broytman            http://phdru.name/            phd <at> phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
Oleg Broytman | 1 Jul 2011 17:29
X-Face
Favicon
Gravatar

Re: SQLObject 1.1.1

On Fri, Jul 01, 2011 at 07:27:42PM +0400, Oleg Broytman wrote:
> What's New
> ==========
> 
> * Parsing sqlobject.__doc__ for version number is declared obsolete. Use
>   sqlobject.version or version_info.
> 
> * Documented sqlmeta.dbEncoding and connection.dbEncoding.

   Documentation update, code was not changed, no need to rush to
upgrade.

   Docs are also published at http://packages.python.org/SQLObject/

Oleg.
--

-- 
     Oleg Broytman            http://phdru.name/            phd <at> phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
Neil Muller | 4 Jul 2011 16:26
Picon

SQLObject and pypy - pydispatcher bug

Currently, sqlobject fails to install properly using pypy due to
robustapply.function failing to do the right thing. This issue was
previously reported against django's included version of pydispatcher
- see https://code.djangoproject.com/ticket/6857 .

Attached is the pypy patch from that ticket tweaked to apply against
sqlobject's included version of pydispatcher - this allows sqlobject
to install using pypy, although I still need to look at running the
test suite.

I've also reported to pydispatcher.sf.net, but the lack of recent
activity suggests it may be some time before it gets fixed there.

-- 
Neil Muller
drnlmuller <at> gmail.com

I've got a gmail account. Why haven't I become cool?
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
Oleg Broytman | 4 Jul 2011 16:43
X-Face
Favicon
Gravatar

Re: SQLObject and pypy - pydispatcher bug

Hi!

On Mon, Jul 04, 2011 at 04:26:39PM +0200, Neil Muller wrote:
> Currently, sqlobject fails to install properly using pypy due to
> robustapply.function failing to do the right thing. This issue was
> previously reported against django's included version of pydispatcher
> - see https://code.djangoproject.com/ticket/6857 .
> 
> Attached is the pypy patch from that ticket tweaked to apply against
> sqlobject's included version of pydispatcher - this allows sqlobject
> to install using pypy

   Thank you! I'll test it.

Oleg.
--

-- 
     Oleg Broytman            http://phdru.name/            phd <at> phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
Neil Muller | 5 Jul 2011 16:24
Picon

Support for later pytest versions

The attached patch reworks SQLObject's test suite to be runnable with pytest 2.

With this patch, I get identical results running the test suite with
pytest 1.3.4 and pytest 2.0.3 against sqlite using python 2.7, and I
can also run the test suite against pypy, although there are several
failures on the pypy run that I still need to investigate.

-- 
Neil Muller
drnlmuller <at> gmail.com

I've got a gmail account. Why haven't I become cool?
Attachment (SQLObject_pytest2.diff): text/x-diff, 2842 bytes
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
Oleg Broytman | 5 Jul 2011 16:52
X-Face
Favicon
Gravatar

Re: Support for later pytest versions

On Tue, Jul 05, 2011 at 04:24:47PM +0200, Neil Muller wrote:
> The attached patch reworks SQLObject's test suite to be runnable with pytest 2.

   Thank you! I hope to test your soon.

Oleg.
--

-- 
     Oleg Broytman            http://phdru.name/            phd <at> phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
Oleg Broytman | 5 Jul 2011 17:22
X-Face
Favicon
Gravatar

Re: Support for later pytest versions

On Mon, Jul 04, 2011 at 04:26:39PM +0200, Neil Muller wrote:
> Attached is the pypy patch from that ticket tweaked to apply against
> sqlobject's included version of pydispatcher

On Tue, Jul 05, 2011 at 04:24:47PM +0200, Neil Muller wrote:
> The attached patch reworks SQLObject's test suite to be runnable with pytest 2.

   I tested both patches - both passed the test suite. Applied and
committed to the trunk in the revisions 4424 and 4425.
   Thank you very much!

Oleg.
--

-- 
     Oleg Broytman            http://phdru.name/            phd <at> phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
Timothy W. Grove | 12 Jul 2011 01:05
Favicon

removing a unique constraint

I have a table in an sqlite database that was created using the 
following class:

class Sentence(SQLObject):
     video = UnicodeCol(alternateID=True, default="", unique=True)
     lang1 = UnicodeCol(default="", unique=True)
     lang2 = UnicodeCol(default="")

I now would like to remove the unique constraint on the 'lang1' column. 
How would I do this? Thanks.

Best regards,
Tim

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2

Gmane