Taia Modlin | 24 Jun 18:13 2015
Picon

querying with foreign key

Hello,

I was wondering if it is possible to filter a table based on a field from it's foreign key.

Thanks
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
Oleg Broytman | 19 Jun 16:40 2015
X-Face

SQLObject 2.2.0b1

Hello!

I'm pleased to announce version 2.2.0b1, the first beta of the upcoming
release of branch 2.2 of SQLObject.

What's new in SQLObject
=======================

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

* Add function col.use_microseconds(True/False). Default is to use
  microseconds (True).

* For MSSQL use datetime2(6) and time(6) columns.

Minor features
--------------

* Minor refactoring to pave the way to Python 3 was merged from
  `SQLObject 1.6.7`_.

Bugfixes
--------

* Fix a bug: mxDateTime doesn't support microseconds; %s in mxDateTime
  format means ticks.

Contributor for this release is Andrew Ziem.

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

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).

Python 2.6 or 2.7 is required.

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:
https://pypi.python.org/pypi/SQLObject/2.2.0b1dev-20150619

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

Oleg.
--

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

------------------------------------------------------------------------------
aseiden | 9 Jun 01:46 2015

Versioning with SQLRelatedJoin?

Is it possible to combine SQLObject Versioning with a SQLRelatedJoin?

Here's what I'm trying to do:  I have a many-to-many relationship 
between two classes, "Asset" and "Cart".  A Cart can have a bunch of 
Assets, and Assets can belong to more than one cart.

I'd like to be able to version changes to the assets that are in the 
cart (i.e. the cart.assets field) as well as the other

Here's a simplified version of what I'm doing:

#!/usr/bin/env python

import os, time, datetime
from sqlobject import *
from sqlobject.versioning import Versioning

class Asset(SQLObject):
     name = StringCol(unique=True, length=255)
     author = StringCol(length=20, default=os.getenv('USER'))
     date = DateTimeCol(default=DateTimeCol.now)
     notes = StringCol(default='')
     savedcarts = SQLRelatedJoin('Cart')

class Cart(SQLObject):
     """ A saved list of AssetItems. Usually created in RepoBrowse. """
     name = StringCol(unique=True, length=255)
     author = StringCol(length=20, default=os.getenv('USER'))
     date = DateTimeCol(default=DateTimeCol.now)
     notes = StringCol(default='')
     assets = SQLRelatedJoin("Asset", addRemoveName="Asset")

     versions = Versioning()

     def dumpVersions(self):
         for i, vers in enumerate(self.versions):
             allAssetNames = [ass.name for ass in vers.assets]
             print "#%d %s %-40.40s %s     Assets: %s"%(i, vers.name, 
vers.notes, vers.date, ','.join(allAssetNames))

if __name__ == '__main__':
     # Make DB
     dbname = os.path.abspath("joinV.sq3")
     os.remove(dbname)
     dburl = 'sqlite://%s'%dbname
     connection = connectionForURI(dburl)
     sqlhub.processConnection = connection

     Asset.createTable(ifNotExists=True)
     Cart.createTable(ifNotExists=True)

     # Make some assets
     assFoo = Asset(name="Foo")
     assBar = Asset(name="Bar")
     assBaz = Asset(name="Baz")
     assAck = Asset(name="Ack")

     # Make a cart
     cart = Cart(name="Savedcart1")

     for i, ass in enumerate([assFoo, assBar, assBaz, assAck]):
         cart.addAsset(ass)
         cart.notes='submission %d--added "%s"'%(i, ass.name)

     cart.dumpVersions()

This outputs:

#0 Savedcart1 2015-06-08 16:36:59     Assets: Foo,Bar,Baz,Ack
#1 Savedcart1 submission 0--added "Foo" 2015-06-08 16:36:59     Assets: 
Foo,Bar,Baz,Ack
#2 Savedcart1 submission 1--added "Bar" 2015-06-08 16:36:59     Assets: 
Foo,Bar,Baz,Ack
#3 Savedcart1 submission 2--added "Baz" 2015-06-08 16:36:59     Assets: 
Foo,Bar,Baz,Ack

What I'd like to see is #0 have vers.assets only contain "Foo", #1 have 
only "Foo" and "Bar", etc.
Is this possible with SQLObject's versioning?

Thanks much!
Alex Seiden

p.s. I'm using Linux (CentOS 6.6), python 2.7, and SQLObject 1.6.  I 
would update to a more recent SQLObject if it would matter, but I didn't 
see anything in the release notes that seemed relevant.  And FWIW, my 
'real' app uses mysql, but sqlite was easier for the example.

------------------------------------------------------------------------------
Oleg Broytman | 27 Mar 21:25 2015
X-Face

SQLObject 3.0.0a1

Hello!

I'm pleased to announce version 3.0.0a1, the first alpha of the upcoming
release of branch 3.0 of SQLObject.

What's new in SQLObject
=======================

Features
--------

* Support for Python 2 and Python 3 with one codebase!
  (Python version >= 3.4 currently required.)

Minor features
--------------

* Use fdb adapter for Firebird.

* PyDispatcher (>=2.0.4) was made an external dependency.

Development
-----------

* Source code was made flake8-clean.

Documentation
-------------

* Documentation is published at http://sqlobject.readthedocs.org/ in
  Sphinx format.

Contributors for this release are Ian Cordasco, Neil Muller,
Lukasz Dobrzanski, Gregor Horvath.

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

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).

Python 2.6, 2.7 or 3.4+ is required.

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:
https://pypi.python.org/pypi/SQLObject/3.0.0a1dev-20150327

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

Oleg.
--

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

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Oleg Broytman | 26 Mar 20:33 2015
X-Face

Python 3

Hi! All tests are green. What's next?

Oleg.
--

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

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Oleg Broytman | 15 Mar 05:15 2015
X-Face

SQLObject 2.1.2 and 1.7.5

Hello!

I'm pleased to announce versions 2.1.2 and 1.7.5, minor feature releases of
of SQLObject.

What's new in SQLObject
=======================

* Use fdb adapter for Firebird.

Contributor for this release is Neil Muller.

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

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).

Python 2.6 or 2.7 is required.

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:
https://pypi.python.org/pypi/SQLObject/2.1.2
https://pypi.python.org/pypi/SQLObject/1.7.5

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

Oleg.
--

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

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Oleg Broytman | 15 Mar 05:13 2015
X-Face

SQLObject 1.6.6

Hello!

I'm pleased to announce version 1.6.6, a minor feature release of branch
1.6 of SQLObject.

What's new in SQLObject
=======================

* Use fdb adapter for Firebird.

Contributor for this release is Neil Muller.

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

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).

Python 2.5 or higher is required.

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:
https://pypi.python.org/pypi/SQLObject/1.6.6

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

Oleg.
--

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

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Oleg Broytman | 9 Mar 23:53 2015
X-Face

SQLObject 2.1.1 and 1.7.4

Hello!

I'm pleased to announce minor bugfix releases 2.1.1 and 1.7.4.

What's new in SQLObject
=======================

* Minor fix in PostgresConnection: close the cursor and connection
  in _createOrDropDatabase even after an error.

Contributor for this release is Gregor Horvath.

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

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).

Python 2.6 or 2.7 is required.

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:
https://pypi.python.org/pypi/SQLObject/2.1.1
https://pypi.python.org/pypi/SQLObject/1.7.4

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

Oleg.
--

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

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Oleg Broytman | 9 Mar 23:51 2015
X-Face

SQLObject 1.6.5

Hello!

I'm pleased to announce version 1.6.5, a minor bugfix release of branch
1.6 of SQLObject.

What's new in SQLObject
=======================

* Minor fix in PostgresConnection: close the cursor and connection
  in _createOrDropDatabase even after an error.

Contributor for this release is Gregor Horvath.

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

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).

Python 2.5 or higher is required.

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:
https://pypi.python.org/pypi/SQLObject/1.6.5

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

Oleg.
--

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

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Neil Muller | 26 Feb 09:13 2015
Picon

Python3 port status update

For those not following github closely, there has been good progess on
the port to python 3. We are now down to only 3 test failures with
python3 and sqlite, and 4 with postgres. No-one's looked at trying to
run against mysql yet, I believe.

The failures in test_unicode are due to the changed unicode handling
in pyton 3, and the tests should probably be reworked for the python 3
behaviour.

The fialure in test_validiation is due to the handling of a custom
class with a __unicode__ method. I'm personally not sure how we should
handle these in python 3. Would it help people porting code to special
case __unicode__ in this case, or should we expect people to update to
using __str__ ?

Regardless of the outstanding test failures, I think the port is at a
point whee it would benefit from more people using and looking at the
code.

--

-- 
Neil Muller
drnlmuller <at> gmail.com

I've got a gmail account. Why haven't I become cool?

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Oleg Broytman | 16 Feb 20:25 2015
X-Face

Sphinx docs

Hello! I've just created a branch sphinx-docs. The docs are published at
https://sqlobject.readthedocs.org/ . The branch needs some help from
people with knowledge of Sphinx.

Oleg.
--

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

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk

Gmane