sqlobject-discuss Mailing List for SQLObject (Page 25)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(2) |
Mar
(43) |
Apr
(204) |
May
(208) |
Jun
(102) |
Jul
(113) |
Aug
(63) |
Sep
(88) |
Oct
(85) |
Nov
(95) |
Dec
(62) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(38) |
Feb
(93) |
Mar
(125) |
Apr
(89) |
May
(66) |
Jun
(65) |
Jul
(53) |
Aug
(65) |
Sep
(79) |
Oct
(60) |
Nov
(171) |
Dec
(176) |
| 2005 |
Jan
(264) |
Feb
(260) |
Mar
(145) |
Apr
(153) |
May
(192) |
Jun
(166) |
Jul
(265) |
Aug
(340) |
Sep
(300) |
Oct
(469) |
Nov
(316) |
Dec
(235) |
| 2006 |
Jan
(236) |
Feb
(156) |
Mar
(229) |
Apr
(221) |
May
(257) |
Jun
(161) |
Jul
(97) |
Aug
(169) |
Sep
(159) |
Oct
(400) |
Nov
(136) |
Dec
(134) |
| 2007 |
Jan
(152) |
Feb
(101) |
Mar
(115) |
Apr
(120) |
May
(129) |
Jun
(82) |
Jul
(118) |
Aug
(82) |
Sep
(30) |
Oct
(101) |
Nov
(137) |
Dec
(53) |
| 2008 |
Jan
(83) |
Feb
(139) |
Mar
(55) |
Apr
(69) |
May
(82) |
Jun
(31) |
Jul
(66) |
Aug
(30) |
Sep
(21) |
Oct
(37) |
Nov
(41) |
Dec
(65) |
| 2009 |
Jan
(69) |
Feb
(46) |
Mar
(22) |
Apr
(20) |
May
(39) |
Jun
(30) |
Jul
(36) |
Aug
(58) |
Sep
(38) |
Oct
(20) |
Nov
(10) |
Dec
(11) |
| 2010 |
Jan
(24) |
Feb
(63) |
Mar
(22) |
Apr
(72) |
May
(8) |
Jun
(13) |
Jul
(35) |
Aug
(23) |
Sep
(12) |
Oct
(26) |
Nov
(11) |
Dec
(30) |
| 2011 |
Jan
(15) |
Feb
(44) |
Mar
(36) |
Apr
(26) |
May
(27) |
Jun
(10) |
Jul
(28) |
Aug
(12) |
Sep
|
Oct
|
Nov
(17) |
Dec
(16) |
| 2012 |
Jan
(12) |
Feb
(31) |
Mar
(23) |
Apr
(14) |
May
(10) |
Jun
(26) |
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(6) |
| 2013 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(4) |
May
(13) |
Jun
(7) |
Jul
(5) |
Aug
(15) |
Sep
(25) |
Oct
(18) |
Nov
(7) |
Dec
(3) |
| 2014 |
Jan
(1) |
Feb
(5) |
Mar
|
Apr
(3) |
May
(3) |
Jun
(2) |
Jul
(4) |
Aug
(5) |
Sep
|
Oct
(11) |
Nov
|
Dec
(62) |
| 2015 |
Jan
(8) |
Feb
(3) |
Mar
(15) |
Apr
|
May
|
Jun
(6) |
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
(19) |
| 2016 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(4) |
May
(3) |
Jun
(7) |
Jul
(14) |
Aug
(13) |
Sep
(6) |
Oct
(2) |
Nov
(3) |
Dec
|
| 2017 |
Jan
(6) |
Feb
(14) |
Mar
(2) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(3) |
Dec
|
| 2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
(44) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2025 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
|
From: Timothy W. G. <tim...@si...> - 2011-07-13 01:25:05
|
Thanks again for your time and help. I've been able to identify the index, but it doesn't appear that sqlite will allow such an index to be dropped: raise OperationalError(ErrorMessage(e)) sqlobject.dberrors.OperationalError: index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped Reading further, it looks like I'll have to do things the hard way: http://stackoverflow.com/questions/1884787/how-do-i-drop-a-constraint-from-a-sqlite-3-6-21-table Best regards, Tim On 13/07/2011 02:01, Oleg Broytman wrote: > On Wed, Jul 13, 2011 at 01:17:42AM +0100, Timothy W. Grove wrote: >> Thanks. That all sounds like what I am looking for. I'm using sqlite3 >> for my backend (with Windows 7, python 2.7, wxpython 2.9, >> SQLObject-1.0.0-py2.6). > For SQLite the query is > > SELECT * FROM sqlite_master WHERE type='index' > > You can use console program sqlite3.exe to connect to your database. > Or you can use GUI program SQLite Database Browser: > http://sqlitebrowser.sourceforge.net/ > > Oleg. |
|
From: Oleg B. <ph...@ph...> - 2011-07-13 01:01:47
|
On Wed, Jul 13, 2011 at 01:17:42AM +0100, Timothy W. Grove wrote: > Thanks. That all sounds like what I am looking for. I'm using sqlite3 > for my backend (with Windows 7, python 2.7, wxpython 2.9, > SQLObject-1.0.0-py2.6). For SQLite the query is SELECT * FROM sqlite_master WHERE type='index' You can use console program sqlite3.exe to connect to your database. Or you can use GUI program SQLite Database Browser: http://sqlitebrowser.sourceforge.net/ Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
|
From: Timothy W. G. <tim...@si...> - 2011-07-13 00:17:56
|
Thanks. That all sounds like what I am looking for. I'm using sqlite3
for my backend (with Windows 7, python 2.7, wxpython 2.9,
SQLObject-1.0.0-py2.6).
Tim
> Plain old SQL and perhaps tricky one. Can I ask - what backend
> do you use, MySQL?
>> Can I issue SQL commands to my database through
>> SQLObject? Thanks again for your help.
> Yes, from a script or even from python interactive prompt. Just open
> your connection the way you do in your programs and call
> connection.query() or connection.queryAll(). Examples:
>
> from sqlobject import connectionForURI
> connection = connectionForURI('mysql://...')
> print connection.queryAll('SHOW INDEX FOR sentence')
> connection.query('DROP INDEX sentence_video_unique')
>
> Oleg.
|
|
From: Oleg B. <ph...@ph...> - 2011-07-12 22:06:11
|
On Tue, Jul 12, 2011 at 10:45:56PM +0100, Timothy W. Grove wrote:
> Thanks for your advice, Oleg, but could you help me out just a little
> bit more? By 'You must drop it yourself', are you meaning that I need to
> go back to using plain old SQL? (I haven't had to do that for awhile
> thanks to SQLObject!!!)
Yes, plain old SQL. SQLObject doesn't map any Python operation to SQL
or any SQL to Python (no ORM does due to impedance mismatch). SQLObject
maps only limited subsets of operations, and the area of schema changes
is very limited.
Plain old SQL and perhaps tricky one. Can I ask - what backend
do you use, MySQL?
> Can I issue SQL commands to my database through
> SQLObject? Thanks again for your help.
Yes, from a script or even from python interactive prompt. Just open
your connection the way you do in your programs and call
connection.query() or connection.queryAll(). Examples:
from sqlobject import connectionForURI
connection = connectionForURI('mysql://...')
print connection.queryAll('SHOW INDEX FOR sentence')
connection.query('DROP INDEX sentence_video_unique')
Oleg.
--
Oleg Broytman http://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|
|
From: Timothy W. G. <tim...@si...> - 2011-07-12 21:46:12
|
Thanks for your advice, Oleg, but could you help me out just a little bit more? By 'You must drop it yourself', are you meaning that I need to go back to using plain old SQL? (I haven't had to do that for awhile thanks to SQLObject!!!) Can I issue SQL commands to my database through SQLObject? Thanks again for your help. Best regards, Tim On 12/07/2011 11:23, Oleg Broytman wrote: > On Tue, Jul 12, 2011 at 12:05:40AM +0100, Timothy W. Grove wrote: >> I now would like to remove the unique constraint on the 'lang1' column. >> How would I do this? Thanks. > SQLObject can only add/drop column, explicit indices and joins. > Unique constraint creates an implicit index which SQLObject doesn't know > about and cannot drop. You are to drop it yourself - list indices for > your table and issue DROP INDEX. > > Oleg. |
|
From: Oleg B. <ph...@ph...> - 2011-07-12 10:23:16
|
On Tue, Jul 12, 2011 at 12:05:40AM +0100, Timothy W. Grove wrote:
> I now would like to remove the unique constraint on the 'lang1' column.
> How would I do this? Thanks.
SQLObject can only add/drop column, explicit indices and joins.
Unique constraint creates an implicit index which SQLObject doesn't know
about and cannot drop. You are to drop it yourself - list indices for
your table and issue DROP INDEX.
Oleg.
--
Oleg Broytman http://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|
|
From: Timothy W. G. <tim...@si...> - 2011-07-11 23:05:51
|
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
|
|
From: Oleg B. <ph...@ph...> - 2011-07-05 15:23:12
|
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/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|
|
From: Oleg B. <ph...@ph...> - 2011-07-05 14:52:27
|
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/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|
|
From: Neil M. <drn...@gm...> - 2011-07-05 14:24:54
|
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 drn...@gm... I've got a gmail account. Why haven't I become cool? |
|
From: Oleg B. <ph...@ph...> - 2011-07-04 14:44:13
|
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/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
|
From: Neil M. <drn...@gm...> - 2011-07-04 14:26:45
|
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 drn...@gm... I've got a gmail account. Why haven't I become cool? |
|
From: Oleg B. <ph...@ph...> - 2011-07-01 15:29:36
|
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/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
|
From: Oleg B. <ph...@ph...> - 2011-07-01 15:27:56
|
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/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
|
From: Oleg B. <ph...@ph...> - 2011-07-01 09:54:03
|
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/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
|
From: Chris B. <cma...@ho...> - 2011-06-30 23:32:33
|
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 |
|
From: Oleg B. <ph...@ph...> - 2011-06-20 10:59:30
|
On Mon, Jun 20, 2011 at 02:47:40PM +0400, Oleg Broytman wrote:
> I'm pleased to announce version 1.1.0, the first stable release of branch
> 1.1 of SQLObject.
Branch 0.15 is unmaintained now.
> * A different workaround is used in SQLiteConnection to prevent PySQLite
> from converting strings to unicode - in the case of a registered text
> conversion function PySQLite silently converts empty strings to Nones;
> now SQLObject uses text_factory instead and properly returns empty
> strings.
Change since 1.1.0b1: as there is no need to parse declarations a
space is no longer inserted between CHAR and (.
Oleg.
--
Oleg Broytman http://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|
|
From: Oleg B. <ph...@ph...> - 2011-06-20 10:47:56
|
Hello! I'm pleased to announce version 1.1.0, the first stable release 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.0 News and changes: http://sqlobject.org/News.html What's New ========== Features & Interface -------------------- * SelectResults (returned from .select()) is allowed in IN(column, list). * A different workaround is used in SQLiteConnection to prevent PySQLite from converting strings to unicode - in the case of a registered text conversion function PySQLite silently converts empty strings to Nones; now SQLObject uses text_factory instead and properly returns empty strings. * It is now possible to declare one encoding for all UnicodeCol's per table (as sqlmeta.dbEncoding) or per connection (as connection.dbEncoding). Default (if dbEncoding is found neither in column nor in table nor in connection) is 'utf-8'. Source code and internals ------------------------- * Decorators @classmethod and @staticmethod are used everywhere. * All 'mydict.has_key(name)' checks were replaced with 'name in mydict'. For a more complete list, please see the news: http://sqlobject.org/News.html Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
|
From: Oleg B. <ph...@ph...> - 2011-06-15 13:24:10
|
Hello! I'm pleased to announce version 1.1.0b1, the first beta of the upcoming release 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.0b1dev-r4409 News and changes: http://sqlobject.org/News.html What's New ========== Features & Interface -------------------- * SelectResults (returned from .select()) is allowed in IN(column, list). * A different workaround is used in SQLiteConnection to prevent PySQLite from converting strings to unicode - in the case of a registered text conversion function PySQLite silently converts empty strings to Nones; now SQLObject uses text_factory instead and properly returns empty strings. * It is now possible to declare one encoding for all UnicodeCol's per table (as sqlmeta.dbEncoding) or per connection (as connection.dbEncoding). Default (if dbEncoding is found neither in column nor in table nor in connection) is 'utf-8'. Source code and internals ------------------------- * Decorators @classmethod and @staticmethod are used everywhere. * All 'mydict.has_key(name)' checks were replaced with 'name in mydict'. For a more complete list, please see the news: http://sqlobject.org/News.html Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
|
From: Oleg B. <ph...@ph...> - 2011-06-13 20:02:48
|
On Mon, Jun 13, 2011 at 03:45:39PM -0400, Peter Douma wrote:
> Thanks for the reply. The actual error is
> OperationalError("Can't create table 'conxt.#sql-d58_57' (errno: 150)",)
>
> The database name is conxt.
> If I ignore this error everything runs fine. You are right that 'organizer'
> has not been created yet. Is it OK to ignore this?
Well, if it works for you, then yes. But of course IWBN to create
tables in the right order or for mutually referencing tables to postpone
constraint creation until all tables are created:
http://sqlobject.org/FAQ.html#mutually-referencing-tables
Oleg.
--
Oleg Broytman http://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|
|
From: Peter D. <pet...@gm...> - 2011-06-13 19:45:51
|
Oleg,
Thanks for the reply. The actual error is
OperationalError("Can't create table 'conxt.#sql-d58_57' (errno: 150)",)
The database name is conxt.
If I ignore this error everything runs fine. You are right that 'organizer'
has not been created yet. Is it OK to ignore this?
----- Original Message -----
From: <sql...@li...>
To: <sql...@li...>
Sent: Monday, June 13, 2011 1:55 PM
Subject: sqlobject-discuss Digest, Vol 61, Issue 1
> Send sqlobject-discuss mailing list submissions to
> sql...@li...
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
> or, via email, send a message with subject or body 'help' to
> sql...@li...
>
> You can reach the person managing the list at
> sql...@li...
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sqlobject-discuss digest..."
>
>
> Today's Topics:
>
> 1. Re: SQLObject 1.0.0 problem with Py 2.4 (Christoph Zwerschke)
> 2. Re: SQLObject 1.0.0 problem with Py 2.4 (Petr Jake?)
> 3. SQLObject 1.0.1 (Oleg Broytman)
> 4. Re: SQLObject 1.0.1 (Christoph Zwerschke)
> 5. SQLObject and Multiprocessing (Gert Burger)
> 6. Re: SQLObject and Multiprocessing (Oleg Broytman)
> 7. Fw: Creating Tables (Peter Douma)
> 8. Re: Creating tables (Oleg Broytman)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 26 May 2011 22:16:57 +0200
> From: Christoph Zwerschke <ci...@on...>
> Subject: Re: [SQLObject] SQLObject 1.0.0 problem with Py 2.4
> To: sql...@li...
> Message-ID: <4DD...@on...>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Am 26.05.2011 21:47 schrieb Oleg Broytman:
> > There is no need for opinions - I'm going to restore Python 2.4
> > compatibility and release SQLObject 1.0.1, just not immediately
>
> Ok, thanks. If you need any help with testing, let me know.
>
> -- Christoph
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 26 May 2011 22:32:46 +0200
> From: Petr Jake? <pet...@tp...>
> Subject: Re: [SQLObject] SQLObject 1.0.0 problem with Py 2.4
> To: sql...@li...
> Message-ID: <BAN...@ma...>
> Content-Type: text/plain; charset="utf-8"
>
> Quis custodiet ipsos custodes? Who does fix bugs in test? ;-)
>
> Nice, thanks :D
>
> Petr
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 3
> Date: Mon, 30 May 2011 15:19:14 +0400
> From: Oleg Broytman <ph...@ph...>
> Subject: [SQLObject] SQLObject 1.0.1
> To: SQLObject discussion <sql...@li...>
> Message-ID: <201...@is...>
> Content-Type: text/plain; charset=us-ascii
>
> Hello!
>
> I'm pleased to announce version 1.0.1, a bugfix release of branch 1.0
> 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.0.1
>
> News and changes:
> http://sqlobject.org/News.html
>
>
> What's New
> ==========
>
> * A syntax incompatibility was fixed in SQLiteConnection that prevented
> SQLObject to be used with Python 2.4.
>
> For a more complete list, please see the news:
> http://sqlobject.org/News.html
>
> Oleg.
> --
> Oleg Broytman http://phdru.name/ ph...@ph...
> Programmers don't die, they just GOSUB without RETURN.
>
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 30 May 2011 18:40:59 +0200
> From: Christoph Zwerschke <ci...@on...>
> Subject: Re: [SQLObject] SQLObject 1.0.1
> To: sql...@li...
> Message-ID: <4DE...@on...>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Am 30.05.2011 13:19, schrieb Oleg Broytman:
>> I'm pleased to announce version 1.0.1, a bugfix release of branch 1.0
>> of SQLObject.
>
> Thanks! It's now working again with Py 2.4.
>
> -- Christoph
>
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 01 Jun 2011 10:39:42 +0200
> From: Gert Burger <ger...@gm...>
> Subject: [SQLObject] SQLObject and Multiprocessing
> To: SQLObject discussion <sql...@li...>
> Message-ID: <4DE...@gm...>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi
>
> Can one use SQLObject with multiprocessing? For example can one create
> extra processes using the multiprocessing.Process using the 'inherited'
> sqlobject environment to handle certain database queries?
>
> Regards
> Gert Burger
>
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 1 Jun 2011 13:01:54 +0400
> From: Oleg Broytman <ph...@ph...>
> Subject: Re: [SQLObject] SQLObject and Multiprocessing
> To: sql...@li...
> Message-ID: <201...@is...>
> Content-Type: text/plain; charset=us-ascii
>
> On Wed, Jun 01, 2011 at 10:39:42AM +0200, Gert Burger wrote:
>> Can one use SQLObject with multiprocessing? For example can one create
>> extra processes using the multiprocessing.Process using the 'inherited'
>> sqlobject environment to handle certain database queries?
>
> I doubt it's possible to share an open connection between processes.
> In a different process you are to open a different connection and that
> would lead to problems with transactions. Perhaps its possible to open a
> different connection and run transaction-less queries.
>
> Oleg.
> --
> Oleg Broytman http://phdru.name/ ph...@ph...
> Programmers don't die, they just GOSUB without RETURN.
>
>
>
> ------------------------------
>
> Message: 7
> Date: Mon, 13 Jun 2011 13:48:08 -0400
> From: "Peter Douma" <pet...@gm...>
> Subject: [SQLObject] Fw: Creating Tables
> To: <sql...@li...>
> Message-ID: <34A6E1E07669401CA91538CFBCFCC49B@LapTop>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> I just started using SQLObject and I would like to use it with Flask. So I
> figured I would separate the models from the actual database working,
> similar to what Django does.
>
> I create the following function to open up the models files and create the
> tables:
>
> import inspect
> import models
>
> def __init__(self):
> members = inspect.getmembers(models, inspect.isclass)
> for name, cls in members:
> if cls.__module__ == 'models':
> try:
> cls.createTable(ifNotExists=True)
> except OperationalError, e:
> raise OperationalError(e)
>
>
> When I get to this model
>
> class Event(SQLObject):
> event_id = IntCol( unique = True )
> describ = StringCol()
> date = DateTimeCol(default = DateTimeCol.now)
> organizer = ForeignKey("Organizer", default=None)
> sponsers = MultipleJoin("Sponser")
> attendees = RelatedJoin("Attendee")
>
> I get the following error:
> conxt.#sql-d58_2b' (errno: 150)
>
> If I run it again, everything works fine. The first time through the table
> is created, but not the the related tables.
>
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 8
> Date: Mon, 13 Jun 2011 21:55:06 +0400
> From: Oleg Broytman <ph...@ph...>
> Subject: Re: [SQLObject] Creating tables
> To: sql...@li...
> Message-ID: <201...@is...>
> Content-Type: text/plain; charset=us-ascii
>
> On Mon, Jun 13, 2011 at 01:48:08PM -0400, Peter Douma wrote:
>> I just started using SQLObject
>
> Welcome!
>
>> When I get to this model
>>
>> class Event(SQLObject):
>> event_id = IntCol( unique = True )
>> describ = StringCol()
>> date = DateTimeCol(default = DateTimeCol.now)
>> organizer = ForeignKey("Organizer", default=None)
>> sponsers = MultipleJoin("Sponser")
>> attendees = RelatedJoin("Attendee")
>>
>> I get the following error:
>> conxt.#sql-d58_2b' (errno: 150)
>
> The error doesn't look like it it's from SQLObject. Can you provide
> more details? Database? driver? full traceback?
>
>> If I run it again, everything works fine. The first time through the
>> table is created, but not the the related tables.
>
> Could it be a problem with ForeignKey pointed to a table
> ('organizer') that hasn't been created yet?
>
> Oleg.
> --
> Oleg Broytman http://phdru.name/ ph...@ph...
> Programmers don't die, they just GOSUB without RETURN.
>
>
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
>
> ------------------------------
>
> _______________________________________________
> sqlobject-discuss mailing list
> sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
>
>
> End of sqlobject-discuss Digest, Vol 61, Issue 1
> ************************************************
>
|
|
From: Oleg B. <ph...@ph...> - 2011-06-13 17:55:09
|
On Mon, Jun 13, 2011 at 01:48:08PM -0400, Peter Douma wrote:
> I just started using SQLObject
Welcome!
> When I get to this model
>
> class Event(SQLObject):
> event_id = IntCol( unique = True )
> describ = StringCol()
> date = DateTimeCol(default = DateTimeCol.now)
> organizer = ForeignKey("Organizer", default=None)
> sponsers = MultipleJoin("Sponser")
> attendees = RelatedJoin("Attendee")
>
> I get the following error:
> conxt.#sql-d58_2b' (errno: 150)
The error doesn't look like it it's from SQLObject. Can you provide
more details? Database? driver? full traceback?
> If I run it again, everything works fine. The first time through the table is created, but not the the related tables.
Could it be a problem with ForeignKey pointed to a table
('organizer') that hasn't been created yet?
Oleg.
--
Oleg Broytman http://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|
|
From: Peter D. <pet...@gm...> - 2011-06-13 17:48:19
|
I just started using SQLObject and I would like to use it with Flask. So I figured I would separate the models from the actual database working, similar to what Django does.
I create the following function to open up the models files and create the tables:
import inspect
import models
def __init__(self):
members = inspect.getmembers(models, inspect.isclass)
for name, cls in members:
if cls.__module__ == 'models':
try:
cls.createTable(ifNotExists=True)
except OperationalError, e:
raise OperationalError(e)
When I get to this model
class Event(SQLObject):
event_id = IntCol( unique = True )
describ = StringCol()
date = DateTimeCol(default = DateTimeCol.now)
organizer = ForeignKey("Organizer", default=None)
sponsers = MultipleJoin("Sponser")
attendees = RelatedJoin("Attendee")
I get the following error:
conxt.#sql-d58_2b' (errno: 150)
If I run it again, everything works fine. The first time through the table is created, but not the the related tables.
|
|
From: Oleg B. <ph...@ph...> - 2011-06-01 09:02:19
|
On Wed, Jun 01, 2011 at 10:39:42AM +0200, Gert Burger wrote:
> Can one use SQLObject with multiprocessing? For example can one create
> extra processes using the multiprocessing.Process using the 'inherited'
> sqlobject environment to handle certain database queries?
I doubt it's possible to share an open connection between processes.
In a different process you are to open a different connection and that
would lead to problems with transactions. Perhaps its possible to open a
different connection and run transaction-less queries.
Oleg.
--
Oleg Broytman http://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|
|
From: Gert B. <ger...@gm...> - 2011-06-01 08:39:53
|
Hi Can one use SQLObject with multiprocessing? For example can one create extra processes using the multiprocessing.Process using the 'inherited' sqlobject environment to handle certain database queries? Regards Gert Burger |