[sqlalchemy] Re: Elixir 0.6.1 released!

2008-08-19 Thread Jorge Vargas

On Mon, Aug 18, 2008 at 11:37 PM, Jose Galvez [EMAIL PROTECTED] wrote:

 I'm not trying to be an ass, but what are the advantages to using Elixer

well you did sound like one :)

the first thing is that declarative is very new to SA (0.4.something,
and only mainstream in 0.5), while elixir has been around since
SA0.2(?)
next elixir is more featurefull than declarative, for instance it
provides you the ability to build custom relationships [1] there was a
really nice example somewhere but I can't find it, maybe it's on the
video.
the other nice feature is giving you a more OOP-ish api, with elixir
you can almost forget you are storing to tables.
last but not least, you have some nice magic that will take care of your tables
Also I believe there is some subclassing/inheritance goodies

That said I'm not the best person to answer this because I'm not a
heavy elixir user, I just wanted to point out it has a purpose, and if
it seems to overlap with SA is because something new was develop and
not the other way around. In fact declarative is an extension
distributed with SA, not a core feature and it was added so people
(including me) stop complaining about how verbose simple projects
where [2], on the other hand elixir is an implementation of Active
Record and beyond.

[1] http://elixir.ematia.de/apidocs/elixir.relationships.html
[2] 
http://groups.google.com/group/sqlalchemy/browse_thread/thread/817097f376fc808b/2e9ac8e83df54090


 Gaetan de Menten wrote:
 I am very pleased to announce that version 0.6.1 of Elixir
 (http://elixir.ematia.de) is now available. As always, feedback is
 very welcome, preferably on Elixir mailing list.

 This is a minor release featuring some bug fixes (one of them to
 handle a late rename in SQLAlchemy's 0.5 beta cycle), a new, slighty
 nicer, syntax for providing custom arguments to the column(s) needed
 for ManyToOne relationships and some exception messages improvements.

 The full list of changes can be seen at:
 http://elixir.ematia.de/trac/browser/elixir/tags/0.6.1/CHANGES

 What is Elixir?
 -

 Elixir is a declarative layer on top of the SQLAlchemy library. It is
 a fairly thin wrapper, which provides the ability to create simple
 Python classes that map directly to relational database tables (this
 pattern is often referred to as the Active Record design pattern),
 providing many of the benefits of traditional databases without losing
 the convenience of Python objects.

 Elixir is intended to replace the ActiveMapper SQLAlchemy extension,
 and the TurboEntity project but does not intend to replace
 SQLAlchemy's core features, and instead focuses on providing a simpler
 syntax for defining model objects when you do not need the full
 expressiveness of SQLAlchemy's manual mapper definitions.

 Mailing list
 

 http://groups.google.com/group/sqlelixir/about



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: Elixir 0.6.1 released!

2008-08-19 Thread Jose Galvez
Thanks for the info, I guess I didn't realize declarative was added so 
recently, its been a while since I actually looked at the SA docs (which 
is where I found it).  But you do make some good points about Elixer, 
I'll have to give it another look, because I do find the way that SA 
defines relationships to be difficult at times
Jose

Jorge Vargas wrote:
 On Mon, Aug 18, 2008 at 11:37 PM, Jose Galvez [EMAIL PROTECTED] wrote:
   
 I'm not trying to be an ass, but what are the advantages to using Elixer
 

 well you did sound like one :)

 the first thing is that declarative is very new to SA (0.4.something,
 and only mainstream in 0.5), while elixir has been around since
 SA0.2(?)
 next elixir is more featurefull than declarative, for instance it
 provides you the ability to build custom relationships [1] there was a
 really nice example somewhere but I can't find it, maybe it's on the
 video.
 the other nice feature is giving you a more OOP-ish api, with elixir
 you can almost forget you are storing to tables.
 last but not least, you have some nice magic that will take care of your 
 tables
 Also I believe there is some subclassing/inheritance goodies

 That said I'm not the best person to answer this because I'm not a
 heavy elixir user, I just wanted to point out it has a purpose, and if
 it seems to overlap with SA is because something new was develop and
 not the other way around. In fact declarative is an extension
 distributed with SA, not a core feature and it was added so people
 (including me) stop complaining about how verbose simple projects
 where [2], on the other hand elixir is an implementation of Active
 Record and beyond.

 [1] http://elixir.ematia.de/apidocs/elixir.relationships.html
 [2] 
 http://groups.google.com/group/sqlalchemy/browse_thread/thread/817097f376fc808b/2e9ac8e83df54090

   
 Gaetan de Menten wrote:
 
 I am very pleased to announce that version 0.6.1 of Elixir
 (http://elixir.ematia.de) is now available. As always, feedback is
 very welcome, preferably on Elixir mailing list.

 This is a minor release featuring some bug fixes (one of them to
 handle a late rename in SQLAlchemy's 0.5 beta cycle), a new, slighty
 nicer, syntax for providing custom arguments to the column(s) needed
 for ManyToOne relationships and some exception messages improvements.

 The full list of changes can be seen at:
 http://elixir.ematia.de/trac/browser/elixir/tags/0.6.1/CHANGES

 What is Elixir?
 -

 Elixir is a declarative layer on top of the SQLAlchemy library. It is
 a fairly thin wrapper, which provides the ability to create simple
 Python classes that map directly to relational database tables (this
 pattern is often referred to as the Active Record design pattern),
 providing many of the benefits of traditional databases without losing
 the convenience of Python objects.

 Elixir is intended to replace the ActiveMapper SQLAlchemy extension,
 and the TurboEntity project but does not intend to replace
 SQLAlchemy's core features, and instead focuses on providing a simpler
 syntax for defining model objects when you do not need the full
 expressiveness of SQLAlchemy's manual mapper definitions.

 Mailing list
 

 http://groups.google.com/group/sqlelixir/about


   

 

   

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: Elixir 0.6.1 released!

2008-08-18 Thread Jose Galvez

I'm not trying to be an ass, but what are the advantages to using Elixer 
over using the declarative syntax such as:
from sqlalchemy import *
from sqlalchemy.orm import relation, scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base


dbe = create_engine(somedatabaseconnectionstring)

session = scoped_session(sessionmaker(bind=dbe))


mapper = session.mapper
meta = MetaData(bind=dbe)

Base = declarative_base(mapper=mapper)


class People(Base):
__table__ = Table('people', meta, autoload=True)
   
def __repr__(self):
return 'user: %s %s' % (self.fname, self.lname)

print 'first get everyone in the database'
people = People.query()
for p in people:
print p

Jose

Gaetan de Menten wrote:
 I am very pleased to announce that version 0.6.1 of Elixir
 (http://elixir.ematia.de) is now available. As always, feedback is
 very welcome, preferably on Elixir mailing list.

 This is a minor release featuring some bug fixes (one of them to
 handle a late rename in SQLAlchemy's 0.5 beta cycle), a new, slighty
 nicer, syntax for providing custom arguments to the column(s) needed
 for ManyToOne relationships and some exception messages improvements.

 The full list of changes can be seen at:
 http://elixir.ematia.de/trac/browser/elixir/tags/0.6.1/CHANGES

 What is Elixir?
 -

 Elixir is a declarative layer on top of the SQLAlchemy library. It is
 a fairly thin wrapper, which provides the ability to create simple
 Python classes that map directly to relational database tables (this
 pattern is often referred to as the Active Record design pattern),
 providing many of the benefits of traditional databases without losing
 the convenience of Python objects.

 Elixir is intended to replace the ActiveMapper SQLAlchemy extension,
 and the TurboEntity project but does not intend to replace
 SQLAlchemy's core features, and instead focuses on providing a simpler
 syntax for defining model objects when you do not need the full
 expressiveness of SQLAlchemy's manual mapper definitions.

 Mailing list
 

 http://groups.google.com/group/sqlelixir/about

   

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---