A quick attempt of showing this. Insert is not covered by SQL but I guess it's simple enough not to be a problem. row_id is bit tricky, I guess the proper way to do it would be to retrieve row count or max value of id column, but that's a tad expensive, not sure how GQL handles this, maybe we can borrow a solution from there.
Note: You need a fairly recent (1.6) release of boto to use this, your best bet is http://code.google.com/p/boto/ In [1]: import boto In [2]: sdb_conn = boto.connect_sdb(aws_access_key_id='KEY', aws_secret_access_key='SECRETKEY') In [3]: print sdb_conn.select("domain_master", "SELECT * FROM domain_master WHERE full = 'no'") [{u'from_date': u'2008-12-22', u'full': u'no', u'name': u'click_tamas_2'}, {u'from_date': u'2008-12-22', u'full': u'no', u'name': u'conversion_tamas_2'}, {u'from_date': u'2009-01-22', u'full': u'no', u'name': u'clickstest_1'}] In [4]: import time In [5]: row_id = time.time() In [5]: sdb_conn.put_attributes("domain_master", str(row_id), {u'from_date': u'2008-12-22', u'full': u'no', u'name': u'click_tamas_3'} ) On Jan 21, 6:18 am, mdipierro <[email protected]> wrote: > can you provide a simple example of using the driver and inserting/ > selecting records? > > Massimo > > On Jan 20, 8:12 pm, achipa <[email protected]> wrote: > > > It has been mentioned previously, but sql style statements are > > actually supported by Amazon's SimpleDB for some time now. I think it > > would be a valuable addition to web2py's DAL, however, just like GQL, > > SimpleDB also has some quirks, so some compromises will probably have > > to be made. I'm not sure I have the time to implement it all by > > myself, but as I've been using SDB for some time now I could be of > > help. We probably don't want to talk directly to the SDB servers (it's > > a SOAP/XMLRPC type request) and do the network/parsing/session > > handling stuff by itself, but rather use the python-boto library which > > handles all this stuff transparently. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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 -~----------~----~----~----~------~----~------~--~---

