Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Database > Database APIs

    SQLObject 1.3.1

    Download button

    No screenshots available
    Downloads: 1,168  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.2/5)
    19 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ian Bicking | More programs
    LGPL / FREE
    May 27th, 2012, 02:10 GMT [view history]
    ROOT / Database / Database APIs

     Read user reviews (0)  Refer to a friend  Subscribe

    SQLObject description

    SQLObject is a popular Object Relational Manager for providing an object interface to your database.

    SQLObject is a popular Object Relational Manager for providing an object interface to your database, with rows as instances, tables as classes and columns as attributes.

    SQLObject includes a Python-object-based query language that makes SQL more abstract, and provides substantial database independence for applications.

    Example

    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 *
    >>>
    >>> sqlhub.processConnection = connectionForURI('sqlite:/:memory:')
    >>>
    >>> class Person(SQLObject):
    ... fname = StringCol()
    ... mi = StringCol(length=1, default=None)
    ... lname = StringCol()
    ...
    >>> Person.createTable()


    SQLObject supports most database schemas that you already have, and can also issue the CREATE statement for you (seen in Person.createTable()).

    Here's how you'd use the object:

    >>> p = Person(fname="John", lname="Doe")
    >>> p

    >>> p.fname
    'John'
    >>> p.mi = 'Q'
    >>> p2 = Person.get(1)
    >>> p2

    >>> p is p2
    True



    Product's homepage

    What's New in This Release: [ read full changelog ]

    · Strings are treated specially in Select to allow Select(['id, 'name'], where='value = 42').
    · ForeignKey('Table', refColumn='refcol_id') allows ForeignKey to point to a non-id column.
    · Support for PostgreSQL 7.* is dropped; the minimal supported version of PostgreSQL is 8.1.
    · Quoting rules have changed for PostgreSQL: SQLObject uses the E'' escape string.
    · A bug caused by psycopg2 recently adding a new Boolean non-callable autocommit attribute was fixed.
    · sqlobject.__doc__ and main.__doc__ no longer contain the version number: use sqlobject.version or version_info.

      


    TAGS:

    Object Relational Manager | object interface | SQL object | ORM | object | relational



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM