On Wed, 2004-09-22 at 10:47, paul k=F6lle wrote:
> Ian Bicking wrote:
> >> class AuthorTable:
> >>
> >> def __init__(self, connection):
> >> Author._connection =3D connection
> >> Author.createTable(ifNotExists=3DTrue) =20
> >>
> >> def createAuthorTable(connection):
> >> AuthorTable(connection)
> >> =20
> >> createAuthorTable(connectionForURI('mysql://markus:eagle@localhost/boo=
ks'))=20
> >>
> >>
> >> a1 =3D Author(firstName =3D "J.R.R.", lastName =3D
> >> "Tolkien")
> >=20
> >=20
> > Yes, this is fine -- you can assign to ._connection as you set up the=20
> > classes. The AuthorTable class seems a little odd to me -- I'd probabl=
y=20
> > do it more like:
> This strikes me too. At first I also made those ...Table: classes but=20
> discovered there is no real use for them since the SQLObject classes are=20
> the tables themselves. It is very strange at first not to have a=20
> distinct object for "tables". It would be nice to address this issue in=20
> the article since it illustrates the (to be changed) object vs.=20
> relational mindset (Markus?).
I think I will mention this in the article.=20
this was just an example how it could be done. in the end=20
the read will have to decide for herself/himself if she/he wants
to do it this way. this also depends on the application of the reader.
thanks for your comments.
I will inform you when the article is published, but this will probably
not happen before 2005.
Markus
>=20
> just my 0.02=A4
> Paul
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> sqlobject-discuss mailing list
> sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
|