That is sweet.

Now I'm going to go generate 20k plus records to see how my database scales!
:)

-Thadeus




On Thu, Nov 12, 2009 at 10:08 AM, mr.freeze <[email protected]> wrote:

>
> I like it! +1
>
> On Nov 12, 5:13 am, Douglas Soares de Andrade <[email protected]>
> wrote:
> > Em Thu, 12 Nov 2009 08:57:32 +0200
> > "Jason (spot) Brower" <[email protected]> escreveu:
> >
> >
> >
> >
> >
> > > AWSOME  This would come in very handy in teaching and testing!
> >
> > > On Thu, Nov 12, 2009 at 8:39 AM, mdipierro <[email protected]>
> > > wrote:
> >
> > > > I do not know if this should be in web2py or not but it can be
> > > > useful for testing and debugging.
> >
> > > > from gluon.contrib.populate import populate
> >
> > > > db=DAL()
> > > > db.define_table('person',
> > > >                Field('name'))
> >
> > > > db.define_table('dog',
> > > >                Field('name'),
> > > >                Field('person',db.person),
> > > >                Field('description',length=50),
> > > >                Field('birthdate','date'))
> >
> > > > populate(db.person,5) ### guess what it does?
> > > > populate(db.dog,10)
> >
> > > > print 'owner, dog name, description, birthdate'
> > > > for row in db(db.person.id==db.dog.person).select():
> > > >    print row.person.name, row.dog.name, row.dog.description,
> > > > row.dog.birthdate
> >
> > > > sample output:
> >
> > > > owner, dog name, description, birthdate
> > > > masasapo cedutopo M.c..Berridge. an untutored bird s wing is famili
> > > > 2000-07-31
> > > > posodaso todacoco Surely follows that these fiery eruptions at 186 0
> > > > 2002-06-16
> > > > posodaso dutocomo Spread over functioning properly the planet the ec
> > > > 1997-05-10
> > > > masasapo macocedu Modes of protozoa and continually added to be shot
> > > > 2003-08-30
> > > > masasapo cetomaso Circling round and explosively from the flesh avai
> > > > 1990-07-27
> > > > posodaso codacopa Fractions showing a dull white polar cap. illustra
> > > > 1987-11-26
> > > > dudamoso cesotaco Economically; a mastery of which the two feet four
> > > > 2003-04-02
> > > > dudamoso tasapoma Accomplishment would explode and open-sea knife-bl
> > > > 1994-05-18
> > > > samotomo dasapama Highly specialized in which they come to the creat
> > > > 1998-11-27
> >
> > Hi all,
> >
> > Totally +1 from me, it helps a lot to make dummy data for testing.
> >
> > Great work, Massimo =)
> >
>

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

Reply via email to