sqlobject-cvs Mailing List for SQLObject (Page 159)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(9) |
Apr
(74) |
May
(29) |
Jun
(16) |
Jul
(28) |
Aug
(10) |
Sep
(57) |
Oct
(9) |
Nov
(29) |
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(7) |
Feb
(14) |
Mar
(6) |
Apr
(3) |
May
(12) |
Jun
(34) |
Jul
(9) |
Aug
(29) |
Sep
(22) |
Oct
(2) |
Nov
(15) |
Dec
(52) |
| 2005 |
Jan
(47) |
Feb
(78) |
Mar
(14) |
Apr
(35) |
May
(33) |
Jun
(16) |
Jul
(26) |
Aug
(63) |
Sep
(40) |
Oct
(96) |
Nov
(96) |
Dec
(123) |
| 2006 |
Jan
(159) |
Feb
(144) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(48) |
Jul
(16) |
Aug
(64) |
Sep
(87) |
Oct
(92) |
Nov
(56) |
Dec
(76) |
| 2007 |
Jan
(94) |
Feb
(103) |
Mar
(126) |
Apr
(123) |
May
(85) |
Jun
(11) |
Jul
(130) |
Aug
(47) |
Sep
(65) |
Oct
(70) |
Nov
(12) |
Dec
(11) |
| 2008 |
Jan
(30) |
Feb
(55) |
Mar
(88) |
Apr
(20) |
May
(50) |
Jun
|
Jul
(38) |
Aug
(1) |
Sep
(9) |
Oct
(5) |
Nov
(6) |
Dec
(39) |
| 2009 |
Jan
(8) |
Feb
(16) |
Mar
(3) |
Apr
(33) |
May
(44) |
Jun
(1) |
Jul
(10) |
Aug
(33) |
Sep
(74) |
Oct
(22) |
Nov
|
Dec
(15) |
| 2010 |
Jan
(28) |
Feb
(22) |
Mar
(46) |
Apr
(29) |
May
(1) |
Jun
(1) |
Jul
(27) |
Aug
(8) |
Sep
(5) |
Oct
(33) |
Nov
(24) |
Dec
(41) |
| 2011 |
Jan
(4) |
Feb
(12) |
Mar
(35) |
Apr
(29) |
May
(19) |
Jun
(16) |
Jul
(32) |
Aug
(25) |
Sep
(5) |
Oct
(11) |
Nov
(21) |
Dec
(12) |
| 2012 |
Jan
(3) |
Feb
(4) |
Mar
(20) |
Apr
(4) |
May
(25) |
Jun
(13) |
Jul
|
Aug
|
Sep
(2) |
Oct
(25) |
Nov
(9) |
Dec
(1) |
| 2013 |
Jan
(6) |
Feb
(8) |
Mar
|
Apr
(10) |
May
(31) |
Jun
(7) |
Jul
(18) |
Aug
(33) |
Sep
(4) |
Oct
(16) |
Nov
|
Dec
(27) |
| 2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(11) |
May
(39) |
Jun
(8) |
Jul
(11) |
Aug
(4) |
Sep
|
Oct
(27) |
Nov
|
Dec
(71) |
| 2015 |
Jan
(17) |
Feb
(47) |
Mar
(33) |
Apr
|
May
|
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(8) |
| 2016 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
|
May
(12) |
Jun
(7) |
Jul
(9) |
Aug
(31) |
Sep
(8) |
Oct
(3) |
Nov
(15) |
Dec
(1) |
| 2017 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(8) |
May
(10) |
Jun
(4) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(4) |
Dec
(5) |
| 2018 |
Jan
(2) |
Feb
(8) |
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
(1) |
Feb
(16) |
Mar
(1) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(1) |
Nov
(1) |
Dec
(4) |
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
|
| 2024 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(9) |
| 2025 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
|
From: <sub...@co...> - 2005-10-02 20:18:50
|
Author: test
Date: 2005-09-30 21:06:27 +0000 (Fri, 30 Sep 2005)
New Revision: 1058
Modified:
SQLObject/trunk/setup.cfg
Log:
Added doc base
Modified: SQLObject/trunk/setup.cfg
===================================================================
--- SQLObject/trunk/setup.cfg 2005-09-30 20:55:20 UTC (rev 1057)
+++ SQLObject/trunk/setup.cfg 2005-09-30 21:06:27 UTC (rev 1058)
@@ -11,6 +11,7 @@
docs/DeveloperGuide.txt docs/FAQ.txt docs/Inheritance.txt
docs/News.txt docs/SQLBuilder.txt docs/sqlobject-admin.txt
docs/community.txt docs/links.txt docs/download.txt
+doc_base = docs/
dest = docs/html
modules = sqlobject
title = SQLObject
|
|
From: <sub...@co...> - 2005-10-02 20:15:58
|
Author: ianb Date: 2005-10-01 22:59:34 +0000 (Sat, 01 Oct 2005) New Revision: 1063 Modified: SQLObject/tags/0.7.0/setup.cfg Log: Auto-update of version strings Modified: SQLObject/tags/0.7.0/setup.cfg =================================================================== --- SQLObject/tags/0.7.0/setup.cfg 2005-10-01 22:59:21 UTC (rev 1062) +++ SQLObject/tags/0.7.0/setup.cfg 2005-10-01 22:59:34 UTC (rev 1063) @@ -1,35 +1,31 @@ [easy_install] -#find_links = http://svn.pythonpaste.org/package_index.html -[egg_info] -tag_build = dev -tag_svn_revision = true - [pudge] -theme = pythonpaste.org -docs = docs/index.txt docs/SQLObject.txt docs/TODO.txt - docs/DeveloperGuide.txt docs/FAQ.txt docs/Inheritance.txt - docs/News.txt docs/SQLBuilder.txt docs/sqlobject-admin.txt - docs/community.txt docs/links.txt docs/download.txt - docs/Authors.txt -doc_base = docs/ +title = SQLObject dest = docs/html +docs = docs/index.txt docs/SQLObject.txt docs/TODO.txt + docs/DeveloperGuide.txt docs/FAQ.txt docs/Inheritance.txt + docs/News.txt docs/SQLBuilder.txt docs/sqlobject-admin.txt + docs/community.txt docs/links.txt docs/download.txt + docs/Authors.txt +settings = normal_link_color=#039 + visited_color=#093 + hover_color=#ddf + body_outer_bg_color=#46a + body_border_color=#09f + nav_container_color=#79f + nav_button_color=#037 + nav_border_color=#05f + no_about=true + link1=/SQLObject.html Documentation modules = sqlobject -title = SQLObject -blog_url = http://sqlobject.org/news/ +doc_base = docs/ +theme = pythonpaste.org mailing_list_url = http://sqlobject.org/community.html -settings = normal_link_color=#039 - visited_color=#093 - hover_color=#ddf - body_outer_bg_color=#46a - body_border_color=#09f - nav_container_color=#79f - nav_button_color=#037 - nav_border_color=#05f - no_about=true - link1=/SQLObject.html Documentation +blog_url = http://sqlobject.org/news/ [publish] -doc-dir = docs/html doc-dest = scp://ianbicking@shell.sf.net/home/groups/s/sq/sqlobject/htdocs/ make-dirs = 1 +doc-dir = docs/html + |
|
From: <sub...@co...> - 2005-10-02 19:44:37
|
Author: ianb Date: 2005-10-01 08:16:17 +0000 (Sat, 01 Oct 2005) New Revision: 1061 Modified: SQLObject/trunk/setup.cfg SQLObject/trunk/sqlobject/main.py SQLObject/trunk/sqlobject/sqlbuilder.py Log: Changed options some; fixed some docstrings Modified: SQLObject/trunk/setup.cfg =================================================================== --- SQLObject/trunk/setup.cfg 2005-09-30 21:35:19 UTC (rev 1060) +++ SQLObject/trunk/setup.cfg 2005-10-01 08:16:17 UTC (rev 1061) @@ -18,7 +18,7 @@ title = SQLObject blog_url = http://sqlobject.org/news/ mailing_list_url = http://sqlobject.org/community.html -settings = link_color=#039 +settings = normal_link_color=#039 visited_color=#093 hover_color=#ddf body_outer_bg_color=#46a @@ -27,8 +27,9 @@ nav_button_color=#037 nav_border_color=#05f no_about=true + link1=/SQLObject.html Documentation [publish] doc-dir = docs/html -doc-dest = scp://ianbicking@shell.sf.net/home/groups/s/sq/sqlobject/htdocs/new/ +doc-dest = scp://ianbicking@shell.sf.net/home/groups/s/sq/sqlobject/htdocs/ make-dirs = 1 Modified: SQLObject/trunk/sqlobject/main.py =================================================================== --- SQLObject/trunk/sqlobject/main.py 2005-09-30 21:35:19 UTC (rev 1060) +++ SQLObject/trunk/sqlobject/main.py 2005-10-01 08:16:17 UTC (rev 1061) @@ -1,10 +1,14 @@ """ -SQLObject.py - Ian Bicking <ia...@co...> 17 Oct 2002 +SQLObject +--------- + +:author: Ian Bicking <ia...@co...> + SQLObject is a object-relational mapper. See SQLObject.html or SQLObject.txt for more. Modified by + Daniel Savard, Xsoli Inc <sqlobject xsoli.com> 7 Feb 2004 - Added support for simple table inheritance. Modified: SQLObject/trunk/sqlobject/sqlbuilder.py =================================================================== --- SQLObject/trunk/sqlobject/sqlbuilder.py 2005-09-30 21:35:19 UTC (rev 1060) +++ SQLObject/trunk/sqlobject/sqlbuilder.py 2005-10-01 08:16:17 UTC (rev 1061) @@ -1,9 +1,11 @@ """ sqlobject.sqlbuilder - 17 Oct 2002, Ian Bicking <ia...@co...> -Builds SQL expressions from normal Python expressions. Python -2.1 or higher IS REQUIRED. +-------------------- +:author: Ian Bicking <ia...@co...> + +Builds SQL expressions from normal Python expressions. + Disclaimer ---------- |
|
From: <sub...@co...> - 2005-10-02 19:42:16
|
Author: ianb Date: 2005-10-01 23:03:56 +0000 (Sat, 01 Oct 2005) New Revision: 1065 Added: SQLObject/branches/0.7-bugfix/ Log: Created branch for bug fixing of 0.7 Copied: SQLObject/branches/0.7-bugfix (from rev 1064, SQLObject/tags/0.7.0) |
|
From: <sub...@co...> - 2005-10-02 19:28:29
|
Author: test Date: 2005-09-30 20:55:20 +0000 (Fri, 30 Sep 2005) New Revision: 1057 Added: SQLObject/trunk/docs/download.txt Removed: SQLObject/trunk/docs/repository.txt Modified: SQLObject/trunk/docs/index.txt SQLObject/trunk/setup.cfg Log: Rearranged front page Added: SQLObject/trunk/docs/download.txt =================================================================== --- SQLObject/trunk/docs/download.txt 2005-09-30 17:27:20 UTC (rev 1056) +++ SQLObject/trunk/docs/download.txt 2005-09-30 20:55:20 UTC (rev 1057) @@ -0,0 +1,35 @@ +Download SQLObject +++++++++++++++++++ + +The latest releases are always available on the `Python Cheese Shop +<http://cheeseshop.python.org/pypi/SQLObject>`_. + +* `SQLObject 0.7rc1 + <http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-0.7rc1.tar.gz>`_ + (source package in ``tar.gz`` format) + +* `0.7rc1 Python 2.4 egg + <http://cheeseshop.python.org/packages/2.4/S/SQLObject/SQLObject-0.7rc1-py2.4.egg>`_ + (`easy_install-friendly + <http://peak.telecommunity.com/DevCenter/EasyInstall>`__ egg + package) + +* `0.7rc1 Python 2.3 egg + <http://cheeseshop.python.org/packages/2.3/S/SQLObject/SQLObject-0.7rc1-py2.3.egg>`_ + (`easy_install-friendly + <http://peak.telecommunity.com/DevCenter/EasyInstall>`__ egg + package) + +Repository +---------- + +The SQLObject `Subversion <http://subversion.tigris.org/>`_ repository is located at http://svn.colorstudy.com/SQLObject/trunk + +If you are using a command-line Subversion client, you can check +it out like:: + + svn co http://svn.colorstudy.com/SQLObject/trunk SQLObject + +If you are on Windows you may want to use `TortoiseSVN +<http://tortoisesvn.tigris.org/>`_. + Modified: SQLObject/trunk/docs/index.txt =================================================================== --- SQLObject/trunk/docs/index.txt 2005-09-30 17:27:20 UTC (rev 1056) +++ SQLObject/trunk/docs/index.txt 2005-09-30 20:55:20 UTC (rev 1057) @@ -2,97 +2,61 @@ SQLObject +++++++++ -News -==== +SQLObject is a popular *Object Relational Manager* for providing an +object interface to your database, with tables as classes, rows as +instances, and columns as attributes. -26-Jan-2005: - SQLObject 0.6.1_ is released (bugfixes). -22-Sep-2004: - SQLObject 0.6_ is released (major updates). -21-Sep-2004: - SQLObject 0.5.3_ is released (bugfixes). -14-Apr-2004: - SQLObject has wiki at http://wiki.sqlobject.org -8-Mar-2004: - SQLObject `0.5.2`_ is released (significant bugfixes). - SQLObject is now in a `Subversion repository <repository.html>`_. -12-Nov-2003: - SQLObject 0.5.1 is released (minor bugfixes) -1-Nov-2003: - SQLObject 0.5 is released. +SQLObject includes a Python-object-based query language that makes SQL +more abstract, and provides substantial database independence for +applications. -.. _0.5.2: docs/News.html#sqlobject-0-5-2 -.. _0.5.3: docs/News.html#sqlobject-0-5-3 -.. _0.6: docs/News.html#sqlobject-0-6 -.. _0.6.1: docs/News.html#sqlobject-0-6-1 +Documentation +============= -Introduction -============ +* `Main SQLObject documentation <SQLObject.html>`_ +* `News and updates <News.html>`_ +* `sqlbuiler documentation <SQLBuilder.html>`_ +* `Frequently Asked Questions <FAQ.html>`_ +* `Inheritance <Inheritance.html>`_ +* `Mailing list, bugs, etc. <community.html>`_ +* `Download <download.html>`_ +* `Related projects and articles <links.html>`_ -SQLObject is an *object-relational mapper*. It allows you to -translate RDBMS table rows into Python objects, and manipulate those -objects to transparently manipulate the database. - -In using SQLObject, you will create a class definition that will -describe how the object connects to the database (in addition to any -other methods you may wish to add to the class). SQLObject will -produce the code to access the database, and update the database with -your changes. The interface to the database is meant to be -indistinguishable from other interfaces you may add to the object. - -SQLObject also includes a novel feature to generate WHERE clauses -using Python syntax and objects (intead of generating SQL using string -substitution, as is traditional). - Example ======= -I love examples. Examples give a feel for the aesthetic of the API, +Examples are good. Examples give a feel for the aesthetic of the API, which matters to me a great deal. This is just a snippet that creates a simple class that wraps a table:: - from SQLObject import * + >>> from sqlobject import * + >>> + >>> sqlhub.processConnection = connectionForURI('sqlite:/:memory:') + >>> + >>> class Person(SQLObject): + ... fname = StringCol() + ... mi = StringCol(length=1, default=None) + ... lname = StringCol() + ... + >>> Person.createTable() - __connection__ = MySQLConnection( - host='localhost', db='sqlobject_test', - user='sqlobject_test', passwd='sqltest') - - class Person(SQLObject): - - firstName = StringCol(length=100) - middleInitial = StringCol(length=1, default=None) - lastName = StringCol(length=100) - -Here's the (MySQL) ``CREATE`` statement for that class:: - - CREATE TABLE person ( - id INT PRIMARY KEY AUTO_INCREMENT, - first_name VARCHAR(100) NOT NULL, - middle_initial CHAR(1), - last_name VARCHAR(100) NOT NULL - ); - SQLObject supports most database schemas that you already have, and -can also issue the ``CREATE`` statement for you. Postgres and SQLite -are also supported (with Sybase and Firebird in the working), and -SQLObject provides an abstraction layer that helps make your -application much more portable between these databases. +can also issue the ``CREATE`` statement for you (seen in +``Person.createTable()``). Here's how you'd use the object:: - >>> p = Person.new(firstName="John", lastName="Doe") - >>> p - <Person 1 firstName='John' middleInitial=None lastName='Doe'> - >>> p.firstName - 'John' - >>> p.middleInitial = 'Q' - >>> p.middleInitial - 'Q' - >>> p2 = Person(1) - >>> p2 - <Person 1 firstName='John' middleInitial='Q' lastName='Doe'> - >>> p is p2 - True + >>> p = Person(fname="John", lname="Doe") + >>> p + <Person 1 fname='John' mi=None lname='Doe'> + >>> p.fname + 'John' + >>> p.mi = 'Q' + >>> p2 = Person.get(1) + >>> p2 + <Person 1 fname='John' mi='Q' lname='Doe'> + >>> p is p2 + True .. image:: http://sourceforge.net/sflogo.php?group_id=74338&type=4 :height: 37 Deleted: SQLObject/trunk/docs/repository.txt =================================================================== --- SQLObject/trunk/docs/repository.txt 2005-09-30 17:27:20 UTC (rev 1056) +++ SQLObject/trunk/docs/repository.txt 2005-09-30 20:55:20 UTC (rev 1057) @@ -1,14 +0,0 @@ -SQLObject Repository -==================== - -SQLObject is kept in a `Subversion <http://subversion.tigris.org/>`_ -repository at http://svn.colorstudy.com/SQLObject/trunk - -If you are using a command-line Subversion client, you can check -it out like:: - - svn co http://svn.colorstudy.com/SQLObject/trunk SQLObject - -If you are on Windows you may want to use `TortoiseSVN -<http://tortoisesvn.tigris.org/>`_. - Modified: SQLObject/trunk/setup.cfg =================================================================== --- SQLObject/trunk/setup.cfg 2005-09-30 17:27:20 UTC (rev 1056) +++ SQLObject/trunk/setup.cfg 2005-09-30 20:55:20 UTC (rev 1057) @@ -10,7 +10,7 @@ docs = docs/index.txt docs/SQLObject.txt docs/TODO.txt docs/DeveloperGuide.txt docs/FAQ.txt docs/Inheritance.txt docs/News.txt docs/SQLBuilder.txt docs/sqlobject-admin.txt - docs/community.txt docs/links.txt docs/repository.txt + docs/community.txt docs/links.txt docs/download.txt dest = docs/html modules = sqlobject title = SQLObject |
|
From: <sub...@co...> - 2005-10-02 18:51:44
|
Author: ianb
Date: 2005-10-01 23:42:48 +0000 (Sat, 01 Oct 2005)
New Revision: 1066
Modified:
SQLObject/trunk/setup.py
Log:
New version for the next era; hurrah\!
Modified: SQLObject/trunk/setup.py
===================================================================
--- SQLObject/trunk/setup.py 2005-10-01 23:03:56 UTC (rev 1065)
+++ SQLObject/trunk/setup.py 2005-10-01 23:42:48 UTC (rev 1066)
@@ -18,7 +18,7 @@
DistributionMetadata.download_url = None
setup(name="SQLObject",
- version="0.7rc1",
+ version="0.8",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
SQLObject is a popular *Object Relational Manager* for providing an
|
|
From: <sub...@co...> - 2005-10-02 18:29:32
|
Author: phd Date: 2005-10-02 18:29:26 +0000 (Sun, 02 Oct 2005) New Revision: 1067 Modified: SQLObject/trunk/docs/TODO.txt Log: Updated TODO with some post-0.7 planned items. Modified: SQLObject/trunk/docs/TODO.txt =================================================================== --- SQLObject/trunk/docs/TODO.txt 2005-10-01 23:42:48 UTC (rev 1066) +++ SQLObject/trunk/docs/TODO.txt 2005-10-02 18:29:26 UTC (rev 1067) @@ -17,3 +17,9 @@ * Automatic joins in select queries. * More kinds of joins, and more powerful join results (closer to how `select` works). +* Refactor ``DBConnection`` to use parameterized queries instead of + generating query strings. +* Deprecate support for Python 2.2. Start using logging instead of print + for debugging output. +* Event system. This will effect columns; patterns like ``onUpdate`` methods + and whatnot. |
|
From: <sub...@co...> - 2005-10-01 01:38:51
|
Author: test Date: 2005-09-30 21:19:29 +0000 (Fri, 30 Sep 2005) New Revision: 1059 Modified: SQLObject/trunk/README.txt SQLObject/trunk/docs/SQLObject.txt Log: Fixed version numbers, simplified README Modified: SQLObject/trunk/README.txt =================================================================== --- SQLObject/trunk/README.txt 2005-09-30 21:06:27 UTC (rev 1058) +++ SQLObject/trunk/README.txt 2005-09-30 21:19:29 UTC (rev 1059) @@ -1,19 +1,14 @@ -=============== -SQLObject 0.6.1 -=============== +SQLObject 0.7 +============= -:Author: Ian Bicking -:Contact: ia...@co... -:Web site: http://colorstudy.com/software/SQLObject - Thanks for looking at SQLObject. SQLObject is an object-relational mapper, i.e., a library that will wrap your database tables in Python classes, and your rows in Python instances. -It absolutely requires Python 2.2 or higher. It currently supports -MySQL through the `MySQLdb` package, PostgreSQL through the -`psycopg` package, SQLite, Firebird, MaxDB (SAP DB) and Sybase. +It currently supports MySQL through the `MySQLdb` package, PostgreSQL +through the `psycopg` package, SQLite, Firebird, MaxDB (SAP DB) and +Sybase. It should support Python versions back to 2.2. For more information please see the documentation in -``docs/SQLObject.html`` +docs/SQLObject.txt, or online at http://sqlobject.org/ Modified: SQLObject/trunk/docs/SQLObject.txt =================================================================== --- SQLObject/trunk/docs/SQLObject.txt 2005-09-30 21:06:27 UTC (rev 1058) +++ SQLObject/trunk/docs/SQLObject.txt 2005-09-30 21:19:29 UTC (rev 1059) @@ -1,6 +1,6 @@ -``````````````` -SQLObject 0.6.1 -``````````````` +````````````` +SQLObject 0.7 +````````````` .. contents:: Contents: |
|
From: <sub...@co...> - 2005-09-30 19:44:26
|
Author: test Date: 2005-09-30 17:27:20 +0000 (Fri, 30 Sep 2005) New Revision: 1056 Modified: SQLObject/trunk/setup.cfg Log: Added styling to change colors Modified: SQLObject/trunk/setup.cfg =================================================================== --- SQLObject/trunk/setup.cfg 2005-09-30 00:03:27 UTC (rev 1055) +++ SQLObject/trunk/setup.cfg 2005-09-30 17:27:20 UTC (rev 1056) @@ -16,6 +16,14 @@ title = SQLObject blog_url = http://sqlobject.org/news/ mailing_list_url = http://sqlobject.org/community.html +settings = link_color=#039 + visited_color=#093 + hover_color=#ddf + body_outer_bg_color=#46a + body_border_color=#09f + nav_container_color=#79f + nav_button_color=#037 + nav_border_color=#05f [publish] doc-dir = docs/html |
|
From: <sub...@co...> - 2005-09-30 00:03:31
|
Author: test Date: 2005-09-30 00:03:27 +0000 (Fri, 30 Sep 2005) New Revision: 1055 Added: SQLObject/trunk/docs/index.txt Removed: SQLObject/trunk/docs/web/ Modified: SQLObject/trunk/docs/ SQLObject/trunk/setup.cfg Log: Moved docs some more; updated to use pudge to generate docs Property changes on: SQLObject/trunk/docs ___________________________________________________________________ Name: svn:ignore - *.html data.db + *.html data.db html Copied: SQLObject/trunk/docs/index.txt (from rev 1050, SQLObject/trunk/docs/web/index.txt) Modified: SQLObject/trunk/setup.cfg =================================================================== --- SQLObject/trunk/setup.cfg 2005-09-30 00:03:08 UTC (rev 1054) +++ SQLObject/trunk/setup.cfg 2005-09-30 00:03:27 UTC (rev 1055) @@ -4,3 +4,20 @@ [egg_info] tag_build = dev tag_svn_revision = true + +[pudge] +theme = pythonpaste.org +docs = docs/index.txt docs/SQLObject.txt docs/TODO.txt + docs/DeveloperGuide.txt docs/FAQ.txt docs/Inheritance.txt + docs/News.txt docs/SQLBuilder.txt docs/sqlobject-admin.txt + docs/community.txt docs/links.txt docs/repository.txt +dest = docs/html +modules = sqlobject +title = SQLObject +blog_url = http://sqlobject.org/news/ +mailing_list_url = http://sqlobject.org/community.html + +[publish] +doc-dir = docs/html +doc-dest = scp://ianbicking@shell.sf.net/home/groups/s/sq/sqlobject/htdocs/new/ +make-dirs = 1 |
|
From: <sub...@co...> - 2005-09-30 00:03:12
|
Author: test Date: 2005-09-30 00:03:08 +0000 (Fri, 30 Sep 2005) New Revision: 1054 Modified: SQLObject/trunk/setup.py Log: Fix link Modified: SQLObject/trunk/setup.py =================================================================== --- SQLObject/trunk/setup.py 2005-09-30 00:02:13 UTC (rev 1053) +++ SQLObject/trunk/setup.py 2005-09-30 00:03:08 UTC (rev 1054) @@ -33,7 +33,7 @@ (SAPDB). For development see the `subversion repository -<http://svn.colorstudy.com/trunk/SQLObject#egg=SQLObject-0.8dev>`_ +<http://svn.colorstudy.com/SQLObject/trunk#egg=SQLObject-0.8dev>`_ """, classifiers=[ "Development Status :: 5 - Production/Stable", |
|
From: <sub...@co...> - 2005-09-30 00:02:23
|
Author: test
Date: 2005-09-30 00:02:13 +0000 (Fri, 30 Sep 2005)
New Revision: 1053
Modified:
SQLObject/trunk/sqlobject/tests/dbtest.py
Log:
Make sure it is importable
Modified: SQLObject/trunk/sqlobject/tests/dbtest.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/dbtest.py 2005-09-29 23:34:09 UTC (rev 1052)
+++ SQLObject/trunk/sqlobject/tests/dbtest.py 2005-09-30 00:02:13 UTC (rev 1053)
@@ -90,7 +90,13 @@
conn.debugOutput = True
return conn
-connection = getConnection()
+try:
+ connection = getConnection()
+except Exception, e:
+ # At least this module should be importable...
+ print >> sys.stderr, (
+ "Could not open database: %s" % e)
+
class InstalledTestDatabase(sqlobject.SQLObject):
"""
|
|
From: <sub...@co...> - 2005-09-29 23:34:17
|
Author: test Date: 2005-09-29 23:34:09 +0000 (Thu, 29 Sep 2005) New Revision: 1052 Added: SQLObject/trunk/docs/community.txt SQLObject/trunk/docs/links.txt SQLObject/trunk/docs/repository.txt Removed: SQLObject/trunk/docs/index.txt SQLObject/trunk/docs/web/community.txt SQLObject/trunk/docs/web/links.txt SQLObject/trunk/docs/web/repository.txt Log: Rearranging docs Copied: SQLObject/trunk/docs/community.txt (from rev 1050, SQLObject/trunk/docs/web/community.txt) Deleted: SQLObject/trunk/docs/index.txt =================================================================== --- SQLObject/trunk/docs/index.txt 2005-09-29 15:33:40 UTC (rev 1051) +++ SQLObject/trunk/docs/index.txt 2005-09-29 23:34:09 UTC (rev 1052) @@ -1,27 +0,0 @@ -SQLObject Documentation -======================= - -`SQLObject Documentation <SQLObject.html>`_: - This covers the core of SQLObject in detail. - -`SQLBuilder Documentation <SQLBuilder.html>`_: - This covers the ``sqlobject.sqlbuilder`` module, which is used - to build SQL queries. - -`Inheritance <Inheritance.html>`_: - This covers ``InheritableSQLObject``, a more useful way of doing - inheritance with SQLObject classes/tables. - -`interface.py <interface.py.html>`_: - A somewhat-formal interface for SQLObject classes and related - objects. - -`News <News.html>`_: - What's new in SQLObject, by version. - -`Frequently Asked Questions <FAQ.html>`_: - Q & A - -`Developer's Guide <DeveloperGuide.html>`_: - Guidelines for contributing code to SQLObject. - Copied: SQLObject/trunk/docs/links.txt (from rev 1050, SQLObject/trunk/docs/web/links.txt) Copied: SQLObject/trunk/docs/repository.txt (from rev 1050, SQLObject/trunk/docs/web/repository.txt) Deleted: SQLObject/trunk/docs/web/community.txt =================================================================== --- SQLObject/trunk/docs/web/community.txt 2005-09-29 15:33:40 UTC (rev 1051) +++ SQLObject/trunk/docs/web/community.txt 2005-09-29 23:34:09 UTC (rev 1052) @@ -1,24 +0,0 @@ -SQLObject Community -=================== - -SQLObject questions and discussion happens on the `sqlobject-discuss -mailing list -<http://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss>`_. -You may want to view the `searchable archives -<http://pythonpaste.org/archives/list/sqlobject-discuss.en.html>`_. -`Gmane <http://www.gmane.org/>`_ also has the list in -`gmane.comp.python.sqlobject -<news://news.gmane.org/gmane.comp.python.sqlobject>`_. - -Bugs should be submitted to the `bug tracker -<http://sourceforge.net/tracker/?group_id=74338&atid=540672>`_, and -`patches to the patch tracker -<http://sourceforge.net/tracker/?group_id=74338&atid=540674>`_. - -Development takes place in the `subversion repository -<repository.html>`_. If you are interested in contributing you should -read the `Developer Guide <docs/DeveloperGuide.html>`_. - -The `Author List <docs/Authors.html>`_ tries to list all the major -contributors. - Deleted: SQLObject/trunk/docs/web/links.txt =================================================================== --- SQLObject/trunk/docs/web/links.txt 2005-09-29 15:33:40 UTC (rev 1051) +++ SQLObject/trunk/docs/web/links.txt 2005-09-29 23:34:09 UTC (rev 1052) @@ -1,68 +0,0 @@ -SQLObject Links -=============== - -If you have a link you'd like added to this page, please `submit a bug -report with the link and title -<http://sourceforge.net/tracker/?atid=540672&group_id=74338&func=browse>`_. - -Open Source Projects --------------------- - -* `sqlos Zope 3 SQLObject integration - <http://codespeak.net/z3/sqlos/>`_. - -* `Subway <http://subway.python-hosting.com/>`_ Web Framework; - integrates tightly with SQLObject for its models. - -* `Nabu <http://furius.ca/nabu/>`_, a publishing system. - -* `Ultra Gleeper <http://www.crummy.com/software/UltraGleeper/>`_, a - Recommendation Engine for Web Pages. - -* `Teeny Tiny CMS <http://footils.org/cms/show/3>`_. - -* `rdflib <http://rdflib.net/>`_ contains a `SQLObject backend - <http://svn.rdflib.net/trunk/rdflib/backends/_sqlobject.py>`_. - -* Enfold Systems' `EnTransit - <http://www.enfoldsystems.com/About/Talks/entransit-tutorial.pdf>`_ - utilizes SQLObject and rdflib for storing transactional content - from Zope. - -* `Bauble <http://bauble.belizebotanic.org/>`_, a Biodiversity - Collection Manager. - -* `Anemon <http://anemon.org/wikini/wakka.php?wiki=FirstPage>`_ DHCP - server. - -* `Planet Plus <http://planetplus.python-hosting.com/>`_; a `CherryPy - <http://cherrypy.org>`_ public feed aggregator. - -* `Guten <http://guten.sourceforge.net/>`_; an application for - browsing, reading, and managing books from `Project Gutenberg - <http://www.gutenberg.org/>`_. - -Articles and Documentation --------------------------- - -* `Canonical's SQLObject guide - <https://wiki.launchpad.canonical.com/SQLObjectGuide>`_. - -* `Webware/Paste + SQLObject Tutorial - <http://pythonpaste.org/docs/TodoTutorial.html>`_. - -* `SQLObject and CherryPy - <http://www.cherrypy.org/wiki/SQLObjectThreadPerConnection>`_. - -* `SQLObject & Database Programming in Python - <http://ianbicking.org/docs/sqlobject-presentation/sqlobject-and-database-programming.html>`_; - slides from a presentation on SQLObject. - -* `Connecting databases to Python with SQLObject - <http://www-128.ibm.com/developerworks/library/os-pythonsqlo/index.html?ca=drs>`_; - an article at DeveloperWorks. - -* `Handling Form data with Formencode + SQLObject - <http://www.groovie.org/articles/2005/08/24/handling-form-data-with-formencode-sqlobject>`_; - a post by Ben Bangert about using SQLObject with `FormEncode - <http://formencode.org>`_. Deleted: SQLObject/trunk/docs/web/repository.txt =================================================================== --- SQLObject/trunk/docs/web/repository.txt 2005-09-29 15:33:40 UTC (rev 1051) +++ SQLObject/trunk/docs/web/repository.txt 2005-09-29 23:34:09 UTC (rev 1052) @@ -1,14 +0,0 @@ -SQLObject Repository -==================== - -SQLObject is kept in a `Subversion <http://subversion.tigris.org/>`_ -repository at http://svn.colorstudy.com/SQLObject/trunk - -If you are using a command-line Subversion client, you can check -it out like:: - - svn co http://svn.colorstudy.com/SQLObject/trunk SQLObject - -If you are on Windows you may want to use `TortoiseSVN -<http://tortoisesvn.tigris.org/>`_. - |
|
From: <sub...@co...> - 2005-09-29 15:33:50
|
Author: ianb
Date: 2005-09-29 15:33:40 +0000 (Thu, 29 Sep 2005)
New Revision: 1051
Modified:
SQLObject/trunk/setup.py
Log:
Changed description, classifiers a little
Modified: SQLObject/trunk/setup.py
===================================================================
--- SQLObject/trunk/setup.py 2005-09-29 06:31:30 UTC (rev 1050)
+++ SQLObject/trunk/setup.py 2005-09-29 15:33:40 UTC (rev 1051)
@@ -18,25 +18,32 @@
DistributionMetadata.download_url = None
setup(name="SQLObject",
- version="0.7b1",
+ version="0.7rc1",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
-Classes created using SQLObject wrap database rows, presenting a
-friendly-looking Python object instead of a database/SQL interface.
-Emphasizes convenience. Works with MySQL, Postgres, SQLite, Firebird.
-Requires Python 2.2+.
+SQLObject is a popular *Object Relational Manager* for providing an
+object interface to your database, with tables as classes, rows as
+instances, and columns as attributes.
+SQLObject includes a Python-object-based query language that makes SQL
+more abstract, and provides substantial database independence for
+applications.
+
+Supports MySQL, PostgreSQL, SQLite, Firebird, Sybase, and MaxDB
+(SAPDB).
+
For development see the `subversion repository
-<http://svn.colorstudy.com/trunk/SQLObject#egg=SQLObject>`_
+<http://svn.colorstudy.com/trunk/SQLObject#egg=SQLObject-0.8dev>`_
""",
- classifiers=["Development Status :: 4 - Beta",
- "Intended Audience :: Developers",
- "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
- "Programming Language :: Python",
- "Topic :: Database",
- "Topic :: Database :: Front-Ends",
- "Topic :: Software Development :: Libraries :: Python Modules",
- ],
+ classifiers=[
+ "Development Status :: 5 - Production/Stable",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
+ "Programming Language :: Python",
+ "Topic :: Database",
+ "Topic :: Database :: Front-Ends",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ ],
author="Ian Bicking",
author_email="ia...@co...",
url="http://sqlobject.org",
|
|
From: <sub...@co...> - 2005-09-29 06:31:35
|
Author: ianb Date: 2005-09-29 06:31:30 +0000 (Thu, 29 Sep 2005) New Revision: 1050 Removed: SQLObject/tags/0.7rc1/setup.cfg Log: Removed empty(ish) file Deleted: SQLObject/tags/0.7rc1/setup.cfg =================================================================== --- SQLObject/tags/0.7rc1/setup.cfg 2005-09-29 06:31:11 UTC (rev 1049) +++ SQLObject/tags/0.7rc1/setup.cfg 2005-09-29 06:31:30 UTC (rev 1050) @@ -1,2 +0,0 @@ -[easy_install] - |
|
From: <sub...@co...> - 2005-09-29 06:31:20
|
Author: ianb
Date: 2005-09-29 06:31:11 +0000 (Thu, 29 Sep 2005)
New Revision: 1049
Modified:
SQLObject/tags/0.7rc1/setup.py
Log:
Updated setup.py
Modified: SQLObject/tags/0.7rc1/setup.py
===================================================================
--- SQLObject/tags/0.7rc1/setup.py 2005-09-29 06:23:58 UTC (rev 1048)
+++ SQLObject/tags/0.7rc1/setup.py 2005-09-29 06:31:11 UTC (rev 1049)
@@ -18,25 +18,32 @@
DistributionMetadata.download_url = None
setup(name="SQLObject",
- version="0.7b1",
+ version="0.7rc1",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
-Classes created using SQLObject wrap database rows, presenting a
-friendly-looking Python object instead of a database/SQL interface.
-Emphasizes convenience. Works with MySQL, Postgres, SQLite, Firebird.
-Requires Python 2.2+.
+SQLObject is a popular *Object Relational Manager* for providing an
+object interface to your database, with tables as classes, rows as
+instances, and columns as attributes.
+SQLObject includes a Python-object-based query language that makes SQL
+more abstract, and provides substantial database independence for
+applications.
+
+Supports MySQL, PostgreSQL, SQLite, Firebird, Sybase, and MaxDB
+(SAPDB).
+
For development see the `subversion repository
-<http://svn.colorstudy.com/trunk/SQLObject#egg=SQLObject>`_
+<http://svn.colorstudy.com/trunk/SQLObject#egg=SQLObject-0.8dev>`_
""",
- classifiers=["Development Status :: 4 - Beta",
- "Intended Audience :: Developers",
- "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
- "Programming Language :: Python",
- "Topic :: Database",
- "Topic :: Database :: Front-Ends",
- "Topic :: Software Development :: Libraries :: Python Modules",
- ],
+ classifiers=[
+ "Development Status :: 5 - Production/Stable",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
+ "Programming Language :: Python",
+ "Topic :: Database",
+ "Topic :: Database :: Front-Ends",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ ],
author="Ian Bicking",
author_email="ia...@co...",
url="http://sqlobject.org",
|
|
From: <sub...@co...> - 2005-09-29 06:24:02
|
Author: ianb Date: 2005-09-29 06:23:58 +0000 (Thu, 29 Sep 2005) New Revision: 1048 Modified: SQLObject/tags/0.7rc1/setup.cfg Log: Auto-update of version strings Modified: SQLObject/tags/0.7rc1/setup.cfg =================================================================== --- SQLObject/tags/0.7rc1/setup.cfg 2005-09-29 06:22:10 UTC (rev 1047) +++ SQLObject/tags/0.7rc1/setup.cfg 2005-09-29 06:23:58 UTC (rev 1048) @@ -1,6 +1,2 @@ [easy_install] -#find_links = http://svn.pythonpaste.org/package_index.html -[egg_info] -tag_build = dev -tag_svn_revision = true |
|
From: <sub...@co...> - 2005-09-29 06:22:17
|
Author: ianb Date: 2005-09-29 06:22:10 +0000 (Thu, 29 Sep 2005) New Revision: 1047 Added: SQLObject/tags/0.7rc1/ Log: Tagging 0.7rc1 version Copied: SQLObject/tags/0.7rc1 (from rev 1046, SQLObject/trunk) |
|
From: <sub...@co...> - 2005-09-29 05:13:25
|
Author: phd
Date: 2005-09-29 05:13:16 +0000 (Thu, 29 Sep 2005)
New Revision: 1046
Modified:
SQLObject/trunk/docs/SQLObject.txt
Log:
Merged docs for sqlmeta created by Jorge Godoy <go...@ie...>.
Modified: SQLObject/trunk/docs/SQLObject.txt
===================================================================
--- SQLObject/trunk/docs/SQLObject.txt 2005-09-27 20:00:52 UTC (rev 1045)
+++ SQLObject/trunk/docs/SQLObject.txt 2005-09-29 05:13:16 UTC (rev 1046)
@@ -437,7 +437,8 @@
Note the use of the ``sqlmeta`` class. This class is used to store
different kinds of metadata (and override that metadata, like
-``table``). This is new in SQLObject 0.7.
+``table``). This is new in SQLObject 0.7. See the section `Class sqlmeta`_
+for more information on how it works and what attributes have special meanings.
And usage::
@@ -621,6 +622,185 @@
are ANDed together. The return value is a `SelectResult`, so you
can slice it, count it, order it, etc.
+
+Class sqlmeta
+-------------
+
+This new class is available starting with SQLObject 0.7 and allows
+specifying metadata in a clearer way, without polluting the class
+namespace with more attributes.
+
+There are some special attributes that can be used inside this class
+that will change the behaviour of the class that contains it. Those
+values are:
+
+`table`:
+ The name of the table in the database. This is derived from
+ ``style`` and the class name if no explicit name is given. If you
+ don't give a name and haven't defined an alternative ``style``, then
+ the standard `MixedCase` to `mixed_case` translation is performed.
+
+`idName`:
+ The name of the primary key column in the database. This is
+ derived from ``style`` if no explicit name is given. The default name
+ is ``id``.
+
+`idType`:
+ A function that coerces/normalizes IDs when setting IDs. This
+ is ``int`` by default (all IDs are normalized to integers).
+
+`style`:
+ A style object -- this object allows you to use other algorithms
+ for translating between Python attribute and class names, and the
+ database's column and table names. See `Changing the Naming
+ Style`_ for more. It is an instance of the `IStyle` interface.
+
+`lazyUpdate`:
+ A boolean (default false). If true, then setting attributes on
+ instances (or using ``inst.set(.)`` will not send ``UPDATE``
+ queries immediately (you must call ``inst.syncUpdates()`` or
+ ``inst.sync()`` first).
+
+`defaultOrder`:
+ When selecting objects and not giving an explicit order, this
+ attribute indicates the default ordering. It is like this value
+ is passed to ``.select()`` and related methods; see those method's
+ documentation for details.
+
+`cacheValues`:
+ A boolean (default true). If true, then the values in the row are
+ cached as long as the instance is kept (and ``inst.expire()`` is
+ not called).
+
+ If set to `False` then values for attributes from the database
+ won't be cached. So every time you access an attribute in the
+ object the database will be queried for a value, i.e., a ``SELECT``
+ will be issued. If you want to handle concurrent access to the
+ database from multiple processes then this is probably the way to
+ do so. You should also use it with transactions_ (it is not
+ implied).
+
+`registry`:
+ Because SQLObject uses strings to relate classes, and these
+ strings do not respect module names, name clashes will occur if
+ you put different systems together. This string value serves
+ as a namespace for classes.
+
+`fromDatabase`:
+ A boolean (default false). If true, then on class creation the
+ database will be queried for the table's columns, and any missing
+ columns (possible all columns) will be added automatically.
+
+`columns`:
+ A dictionary of ``{columnName: anSOColInstance}``. You can get
+ information on the columns via this read-only attribute.
+
+`columnList`:
+ A list of the values in ``columns``. Sometimes a stable, ordered
+ version of the columns is necessary; this is used for that.
+
+`columnDefinitions`:
+ A dictionary like ``columns``, but contains the original column
+ definitions (which are not class-specific, and have no logic).
+
+`joins`:
+ A list of all the Join objects for this class.
+
+`indexes`:
+ A list of all the indexes for this class.
+
+
+There is also one instance attribute:
+
+`expired`:
+ A boolean. If true, then the next time this object's column
+ attributes are accessed a query will be run.
+
+
+While in previous versions of SQLObject those attributes were defined
+directly at the class that will map your database data to Python and
+all of them were prefixed with an underscore, now it is suggested that
+you change your code to this new style. The old way will be removed
+when SQLObject 0.8 is out and you'll receive lots of warning messages
+saying that if you're not using the ``sqlmeta`` class you're doing things
+in a deprecated way.
+
+Using sqlmeta
+~~~~~~~~~~~~~
+
+To use sqlmeta you should write code like this example::
+
+ class MyClass(SQLObject):
+
+ class sqlmeta:
+ lazyUpdate = True
+ cacheValues = False
+
+ columnA = StringCol()
+ columnB = IntCol()
+
+ def _set_attr1(self, value):
+ # do something with value
+
+ def _get_attr1(self):
+ # do something to retrieve value
+
+
+The above definition is creating a table ``my_class`` (the name may be
+different if you changet the ``style`` used) with two columns called
+columnA and columnB. There's also a third field that can be accessed
+using ``MyClass.attr1``. The sqlmeta class is changing the behaviour
+of ``MyClass`` so that it will perform lazy updates (you'll have to call
+the ``.sync()`` method to write the updates to the database) and it is
+also telling that ``MyClass`` won't have any cache, so that every time
+you ask for some information it will be retrieved from the database.
+
+
+SQLObject Class
+---------------
+
+Besides sqlmeta and columns specifications, there are a number of other
+special attributes you can set in your class. Those are listed below but,
+except for the ``_connection`` attribute, all other are superseded by the
+implementation shown before with sqlmeta. If you use them with SQLObject
+0.7 you'll get warnings about their deprecation and you'll probably have
+to convert your code in future releases, when these are dropped.
+
+`_connection`:
+ The connection object to use, from `DBConnection`. You can also
+ set the variable `__connection__` in the enclosing module and it
+ will be picked up (be sure to define `__connection__` before your
+ class). You can also pass a connection object in at instance
+ creation time, as described in transactions_.
+
+ If you have defined `sqlhub.processConnection` then this attribute can
+ be ommited from your class and the sqlhub will be used instead. If
+ you have several classes using the same connection that might be an
+ advantage, besides saving a lot of typing.
+
+`_table`:
+ This is old style and works the same way as the `table` attribute
+ from sqlmeta class.
+
+`_joins`:
+ This is old style and works the same way as the `joins` attribute
+ from sqlmeta class.
+
+`_cacheValues`:
+ This is old style and works the same way as the `cacheValues`
+ attribute from sqlmeta class.
+
+.. _idName:
+
+`_idName`:
+ This is old style and works the same way as the `idName` attribute
+ from sqlmeta class.
+
+`_style`:
+ This is old style and works the same way as the `style` attribute
+ from sqlmeta class.
+
+
Customizing the Objects
-----------------------
@@ -891,46 +1071,6 @@
encoding yourself.
-SQLObject Class: Specifying Your Class
---------------------------------------
-
-In addition to the columns, there are a number of other special
-attributes you can set in your class.
-
-`_connection`:
- The connection object to use, from `DBConnection`. You can also
- set the variable `__connection__` in the enclosing module and it
- will be picked up (be sure to define `__connection__` before you
- class). You can also pass a connection object in at instance
- creation time, as described in transactions_.
-
-`_table`:
- The database name of the table for this class. If you don't give
- a name, then the standard ``MixedCase`` to ``mixed_case``
- translation is performed.
-
-`_joins`:
- A list of `Join` objects. This is covered below.
-
-`_cacheValues`:
- If set to ``False`` then values for attributes from the database
- won't be cached. So every time you access an attribute in the
- object the database will be queried for a value. If you want to
- handle concurrent access to the database from multiple processes
- then this is probably the way to do so. You should also use
- it with transactions_ (it is not implied).
-
-.. _idName:
-
-`_idName`:
- The name of the primary key column (default ``id``).
-
-`_style`:
- A style object -- this object allows you to use other algorithms
- for translating between Python attribute and class names, and the
- database's column and table names. See `Changing the Naming
- Style`_ for more.
-
.. Relationships_:
Relationships Between Classes/Tables
|
|
From: <sub...@co...> - 2005-09-27 20:01:09
|
Author: phd
Date: 2005-09-27 20:00:52 +0000 (Tue, 27 Sep 2005)
New Revision: 1045
Modified:
SQLObject/trunk/sqlobject/inheritance/tests/test_deep_inheritance.py
SQLObject/trunk/sqlobject/inheritance/tests/test_inheritance.py
Log:
Minor fixes by alexander smishlajev <al...@an...> in inheritnace tests
for MySQL: MySQL cannot create indicies on TEXT fields.
Modified: SQLObject/trunk/sqlobject/inheritance/tests/test_deep_inheritance.py
===================================================================
--- SQLObject/trunk/sqlobject/inheritance/tests/test_deep_inheritance.py 2005-09-27 19:26:43 UTC (rev 1044)
+++ SQLObject/trunk/sqlobject/inheritance/tests/test_deep_inheritance.py 2005-09-27 20:00:52 UTC (rev 1045)
@@ -9,7 +9,7 @@
class DIPerson(InheritableSQLObject):
firstName = StringCol()
- lastName = StringCol(alternateID=True)
+ lastName = StringCol(alternateID=True, length=255)
manager = ForeignKey("DIManager", default=None)
class DIEmployee(DIPerson):
Modified: SQLObject/trunk/sqlobject/inheritance/tests/test_inheritance.py
===================================================================
--- SQLObject/trunk/sqlobject/inheritance/tests/test_inheritance.py 2005-09-27 19:26:43 UTC (rev 1044)
+++ SQLObject/trunk/sqlobject/inheritance/tests/test_inheritance.py 2005-09-27 20:00:52 UTC (rev 1045)
@@ -9,7 +9,7 @@
class InheritablePerson(InheritableSQLObject):
firstName = StringCol()
- lastName = StringCol(alternateID=True)
+ lastName = StringCol(alternateID=True, length=255)
class Employee(InheritablePerson):
_inheritable = False
|
|
From: <sub...@co...> - 2005-09-26 14:50:54
|
Author: phd
Date: 2005-09-26 14:50:42 +0000 (Mon, 26 Sep 2005)
New Revision: 1043
Modified:
SQLObject/trunk/docs/SQLObject.txt
Log:
Added a section describing connection URIs.
Modified: SQLObject/trunk/docs/SQLObject.txt
===================================================================
--- SQLObject/trunk/docs/SQLObject.txt 2005-09-26 05:15:12 UTC (rev 1042)
+++ SQLObject/trunk/docs/SQLObject.txt 2005-09-26 14:50:42 UTC (rev 1043)
@@ -130,6 +130,34 @@
Declaring the Class
-------------------
+The connection URI must follow the standard URI syntax::
+
+ scheme://[user[:password]@]host[:port]/database[?parameters]
+
+Scheme is one of ``sqlite``, ``mysql``, ``postgres``, ``firebird``,
+``interbase``, ``maxdb``, ``sapdb``, ``sybase``.
+
+Examples::
+
+ mysql://user:passwd@host/database
+ mysql://host/database?debug=1
+ postgres://user@host/database?debug=&cache=
+ postgres://host:5432/database
+ sqlite:///full/path/to/database
+ sqlite:/C|/full/path/to/database
+ sqlite:/:memory:
+
+Note that there is a special syntax to specify full path on w32 systems
+(useable for sqlite and firebird); also sqlite can manipulate special
+in-memory databases.
+
+Parameters are: ``debug`` (default: False), ``debugOutput`` (default: False),
+``cache`` (default: True), ``autoCommit`` (default: True),
+``debugThreading`` (default: False).
+
+If you want to pass True value in a connection URI - pass any non-empty
+string; an empty string for False.
+
Lets first set up a connection::
>>> db_filename = os.path.abspath('data.db')
@@ -139,6 +167,7 @@
>>> connection = connectionForURI(connection_string)
>>> sqlhub.processConnection = connection
+
The ``sqlhub.processConnection`` assignment means that all classes
will, by default, use this connection we've just set up.
|
|
From: <sub...@co...> - 2005-09-25 06:14:31
|
Author: ianb
Date: 2005-09-25 06:14:26 +0000 (Sun, 25 Sep 2005)
New Revision: 1032
Modified:
SQLObject/trunk/docs/SQLObject.txt
Log:
Added note about _get_/_set_ and .select()
Modified: SQLObject/trunk/docs/SQLObject.txt
===================================================================
--- SQLObject/trunk/docs/SQLObject.txt 2005-09-25 01:38:00 UTC (rev 1031)
+++ SQLObject/trunk/docs/SQLObject.txt 2005-09-25 06:14:26 UTC (rev 1032)
@@ -729,6 +729,14 @@
out. One advantage of methods (as opposed to attribute access) is
that the programmer is more likely to expect this disconnect.
+ Also note while these conversions will take place when getting and
+ setting the column, in queries the conversions will not take place.
+ So if you convert the value from a "Pythonic" representation to a
+ "SQLish" representation, your queries (when using ``.select()`` and
+ ``.selectBy()``) will have to be in terms of the SQL/Database
+ representation (as those commands generate SQL that is run on the
+ database).
+
Reference
=========
|
|
From: <sub...@co...> - 2005-09-25 01:38:06
|
Author: ianb
Date: 2005-09-25 01:38:00 +0000 (Sun, 25 Sep 2005)
New Revision: 1031
Modified:
SQLObject/trunk/sqlobject/manager/command.py
Log:
Read .ini configuration files that use %(here)s and other variable substitution
Modified: SQLObject/trunk/sqlobject/manager/command.py
===================================================================
--- SQLObject/trunk/sqlobject/manager/command.py 2005-09-24 21:03:15 UTC (rev 1030)
+++ SQLObject/trunk/sqlobject/manager/command.py 2005-09-25 01:38:00 UTC (rev 1031)
@@ -333,8 +333,8 @@
if '#' in conf_fn:
conf_fn, conf_section = conf_fn.split('#', 1)
- from ConfigParser import RawConfigParser
- p = RawConfigParser()
+ from ConfigParser import ConfigParser
+ p = ConfigParser()
# Case-sensitive:
p.optionxform = str
if not os.path.exists(conf_fn):
@@ -343,11 +343,15 @@
raise OSError(
"Config file %s does not exist" % self.options.config_file)
p.read([conf_fn])
+ p._defaults.setdefault(
+ 'here', os.path.dirname(os.path.abspath(conf_fn)))
possible_sections = []
for section in p.sections():
name = section.strip().lower()
- if conf_section == name or conf_section == name.split(':')[-1]:
+ if (conf_section == name or
+ (conf_section == name.split(':')[-1]
+ and name.split(':')[0] in ('app', 'application'))):
possible_sections.append(section)
if not possible_sections:
|
|
From: <sub...@co...> - 2005-09-24 21:03:20
|
Author: phd
Date: 2005-09-24 21:03:15 +0000 (Sat, 24 Sep 2005)
New Revision: 1030
Modified:
SQLObject/trunk/docs/Inheritance.txt
Log:
English grammar and wording corrections by Jennings Jared.
Modified: SQLObject/trunk/docs/Inheritance.txt
===================================================================
--- SQLObject/trunk/docs/Inheritance.txt 2005-09-23 22:19:27 UTC (rev 1029)
+++ SQLObject/trunk/docs/Inheritance.txt 2005-09-24 21:03:15 UTC (rev 1030)
@@ -6,15 +6,15 @@
Why
~~~
-Imagine you have a list or persons, and every person plays a certain role.
+Imagine you have a list of persons, and every person plays a certain role.
Some persons are students, some are professors, some are employees. Every
role has different attributes. Students are known by their department and
-year. Professors has department (some attributes are common for all or some
+year. Professors have a department (some attributes are common for all or some
roles), timetable and other attributes.
-How do one implements this in SQL? Well, the obvious approach is to create
-a table Person with a column that describes or name the role, and a table
-for an every role. Then one must write a code that interprets and
+How does one implement this in SQLObject? Well, the obvious approach is to
+create a table Person with a column that describes or name the role, and a
+table for an every role. Then one must write code that interprets and
dereferences the role column.
Well, the inheritance machinery described below does exactly this! Only it
@@ -103,9 +103,9 @@
[<Student 1 year=1 department='CS'>, <Professor 2 timetable=None department='Mathematics'>]
-Look, you have got a list of Role's subclasses!
+Look - you have gotten a list of Role's subclasses!
-If you add a MultipleJoin column to Role you can list all persons for a
+If you add a MultipleJoin column to Role, you can list all persons for a
given role::
class Role(InheritableSQLObject):
@@ -120,7 +120,7 @@
[<Person 1 name='A student' age=21.0 roleID=1>]
[<Person 2 name='A professor' age=42.0 roleID=2>]
-If you you want your persons to have many roles - use RelatedJoin::
+If you you want your persons to have many roles, use RelatedJoin::
class Role(InheritableSQLObject):
department = StringCol()
@@ -169,17 +169,17 @@
Daniel Savard has implemented inheritance for SQLObject. According to
ObjectMatter_ this is a kind of vertical inheritance. The only difference
-is that objects reference their leafs, not parents. Links to parents are
+is that objects reference their leaves, not parents. Links to parents are
reconstructed at run-time using the hierarchy of Python classes.
.. _ObjectMatter: http://www.objectmatter.com/vbsf/docs/maptool/ormapping.html
* As suggested by Ian Bicking, each child class now has the same
- ID than the parent class. No more need for childID column and
- parent foreignKey (with a small speed boost).
-* No more need to call getSubClass as the 'latest' child will always
+ ID as the parent class. No more need for childID column and
+ parent foreignKey (and a small speed boost).
+* No more need to call getSubClass, as the 'latest' child will always
be returned when an instance of a class is created.
-* This version now seems to works correctly with addColumn, delColumn,
+* This version now seems to work correctly with addColumn, delColumn,
addJoin and delJoin.
The following code::
@@ -213,10 +213,10 @@
Each class that inherits from a parent class will get the same ID as
the parent class. So, there is no need to keep track of parent ID and
-child ID as they are the same.
+child ID, as they are the same.
The column childName will contain the name of the child class (for
-example 'Employee'). This will permit to a class to always return its
+example 'Employee'). This will permit a class to always return its
child class if available (a person that is also an employee will always
return an instance of the employee class).
@@ -256,16 +256,16 @@
If you use p2, as p2 is a person object, you will get an employee
object.
person(0) will return a Person instance and will have the following
-attributes: firstName and lastName
-person(1) or employee(1) will each return the same Employee instance and
-will have the following attributes: firstName, lastName and position
+attributes: firstName and lastName.
+person(1) or employee(1) will both return the same Employee instance and
+will have the following attributes: firstName, lastName and position.
-Also, deleting a person or an employee that are linked will destroy
+Also, deleting a person or an employee that is linked will destroy
both entries as one would expect.
-The SQLObject q magic also work. Using this select are valid::
+The SQLObject q magic also works. Using these selects is valid::
- Employee.select(AND(Employee.q.firstName == 'Jane' Employee.q.position == 'Chief')) will return Jane Doe
+ Employee.select(AND(Employee.q.firstName == 'Jane', Employee.q.position == 'Chief')) will return Jane Doe
Employee.select(AND(Person.q.firstName == 'Jane', Employee.q.position == 'Chief')) will return Jane Doe
Employee.select(Employee.q.lastName == 'Doe') will only return Jane Doe (as Joe isn't an employee)
Person.select(Person.q.lastName == 'Doe') will return both entries.
@@ -294,15 +294,15 @@
will never be inherited), you must set '_inheritable' to False in this
class.
* The inheritance implementation is incompatible with lazy updates. Do not
- set lazyUpdate to True. If you need this - you have to patch SQLObject
+ set lazyUpdate to True. If you need this, you have to patch SQLObject
and override many methods - _SO_setValue(), sync(), syncUpdate() at
least. Patches will be gladly accepted.
* I made it because I needed to be able to have automatic
- inheritance with linked table.
-* This version works for me, it may not works for you. I tried to do
+ inheritance with linked tables.
+* This version works for me; it may not work for you. I tried to do
my best but it is possible that I broke some things... So, there
is no warranty that this version will work.
-* Thanks to Ian Bicking for SQLObject, this is a wonderful python
+* Thanks to Ian Bicking for SQLObject; this is a wonderful python
module.
* If you have suggestion, bugs, or patch to this patch, you can
- contact SQLObject team: <sqlobject-discuss at lists.sourceforge.net>
+ contact the SQLObject team: <sqlobject-discuss at lists.sourceforge.net>
|
|
From: <sub...@co...> - 2005-09-22 16:41:02
|
Author: phd
Date: 2005-09-22 16:40:55 +0000 (Thu, 22 Sep 2005)
New Revision: 1025
Modified:
SQLObject/trunk/sqlobject/firebird/__init__.py
SQLObject/trunk/sqlobject/maxdb/__init__.py
SQLObject/trunk/sqlobject/postgres/__init__.py
Log:
Fixed isSupported.
Modified: SQLObject/trunk/sqlobject/firebird/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/firebird/__init__.py 2005-09-22 16:04:21 UTC (rev 1024)
+++ SQLObject/trunk/sqlobject/firebird/__init__.py 2005-09-22 16:40:55 UTC (rev 1025)
@@ -9,5 +9,6 @@
import kinterbasdb
except ImportError:
return False
+ return True
registerConnection(['firebird', 'interbase'], builder, isSupported)
Modified: SQLObject/trunk/sqlobject/maxdb/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/maxdb/__init__.py 2005-09-22 16:04:21 UTC (rev 1024)
+++ SQLObject/trunk/sqlobject/maxdb/__init__.py 2005-09-22 16:40:55 UTC (rev 1025)
@@ -9,6 +9,6 @@
import sapdb
except ImportError:
return False
- return False
+ return True
registerConnection(['maxdb','sapdb'],builder, isSupported)
Modified: SQLObject/trunk/sqlobject/postgres/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/postgres/__init__.py 2005-09-22 16:04:21 UTC (rev 1024)
+++ SQLObject/trunk/sqlobject/postgres/__init__.py 2005-09-22 16:40:55 UTC (rev 1025)
@@ -9,7 +9,7 @@
import psycopg
except ImportError:
return False
- return False
+ return True
registerConnection(['postgres', 'postgresql', 'psycopg'],
builder, isSupported)
|