Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 9 and Version 10 of UsingSqlAlchemy


Ignore:
Timestamp:
06/04/06 00:46:50 (13 years ago)
Author:
anonymous
Comment:

converted from restructured text to wiki formatting

Legend:

Unmodified
Added
Removed
Modified
  • UsingSqlAlchemy

    v9 v10  
    1 {{{ 
    2 #!rst 
     1= Using SQLAlchemy = 
    32 
    4 ================ 
    5 Using SQLAlchemy 
    6 ================ 
    73 
    8 `SQLAlchemy`_ is a new ORM library developed by Michael Bayer. Michael claims 
     4[http://www.sqlalchemy.org/ SQLAlchemy] is a new ORM library developed by Michael Bayer. Michael claims 
    95that SQLAlchemy is not a framework and does not need to dictate program 
    106architecutre in order to work. The fundamental concept (borrowed from Java's 
     
    128in order to produce the most efficient SQL queries. 
    139 
    14 _`SQLAlchemy`: http://www.sqlalchemy.org/ 
     10 
    1511 
    1612Notable advantages of SQLAlchemy over SQLObject are the ability to map 
     
    4440`basic data mapping`_, and `advanced data mapping`_ are well worth the read. 
    4541 
    46 .. _`SQLAlchemy Download Page`: http://www.sqlalchemy.org/download.myt 
    47 .. _documentation: http://www.sqlalchemy.org/docs/ 
    48 .. _`sql construction`: http://www.sqlalchemy.org/docs/sqlconstruction.myt 
    49 .. _`basic data mapping`: http://www.sqlalchemy.org/docs/datamapping.myt 
    50 .. _`advanced data mapping`: http://www.sqlalchemy.org/docs/adv_datamapping.myt 
     42 * [http://www.sqlalchemy.org/download.myt SQLAlchemy Download Page] 
     43 * [http://www.sqlalchemy.org/docs/ documentation] 
     44 * [http://www.sqlalchemy.org/docs/sqlconstruction.myt sql construction] 
     45 * [http://www.sqlalchemy.org/docs/datamapping.myt basic data mapping] 
     46 * [http://www.sqlalchemy.org/docs/adv_datamapping.myt advanced data mapping] 
    5147 
    5248The documentation is slightly confused in some places, so be sure you notice 
     
    116112in mind that ``convert_bind_param`` is  **to** the database while  
    117113``convert_result_value`` is **from** the database. 
    118  
    119 .. code-block:: python 
     114{{{ 
     115#!python 
    120116 
    121117  import time 
     
    127123      def convert_result_value(self,value,engine): 
    128124          return datetime.fromtimestamp(super(TIMESTAMP,self).convert_result_value(value,engine)) 
    129          
    130 .. code-block:: python 
     125}}}         
     126{{{ 
     127#!python 
    131128 
    132129  import struct 
     
    147144      def convert_result_value(self,value,engine): 
    148145          return inet_ntoa(struct.pack('!L',super(IPV4,self).convert_result_value(value,engine)) 
    149  
     146}}} 
    150147Future Developments 
    151148------------------- 
    152149 
    153150Jonathan LaCour is working on a declarative way of describing forms through 
    154 his `ActiveMapper`_ project. 
     151his [http://groups.google.com/group/turbogears/browse_frm/thread/cd5e46d9359029b8 ActiveMapper] project. 
    155152 
    156 _`ActiveMapper`: http://groups.google.com/group/turbogears/browse_frm/thread/cd5e46d9359029b8 
    157 }}} 
     153