awesome! thanks for the info! i'll use validate_and_insert & validate_and_update (i think that should do it), and I look forward to seeing your Rows.validade_and_update_record()! :)
thanks, Mart On Jun 21, 11:08 pm, Bruno Rocha <rochacbr...@gmail.com> wrote: > Some more examples: > > *IS IN SET* > In [29]: IS_IN_SET([1,2,3])("1") > Out[29]: ('1', None) > > In [30]: IS_IN_SET([0,2,3])("1") > Out[30]: ('1', <lazyT 'value not allowed'>) > > *IS NOT IN DB* > In [60]: IS_NOT_IN_DB(db,'auth_user.id')('3') > Out[60]: ('3', None) > > ###### NOTE that logic is inverse ##### > my_id = 5 > if IS_NOT_IN_DB(db,'table.id')(my_id)[1]: > # if returns true, the value is already in db > print "sorry cant duplicate the record id" > else: > #if returns false, means that the value is not in db > db.table.insert(...) > > -- > Bruno Rocha > [ About me:http://zerp.ly/rochacbruno]