Any progress on this feature?
This could be really nice.
Do not forget the *before render* and *after render* and workflow events.
this is very useful triggers and are not related to database.
maybe it is more easy to implement in template engine.
http://zerp.ly/rochacbruno
Em 12/10/2011 10:24, "Massimo Di Pierro"
escreveu:
> So basically the event
On 11/10/2011 22:23, Massimo Di Pierro wrote:
form=SQLFORM(...).process(onsuccess=lambda form:...)
not exactly what I was asking for... I thought about a method of the
table object run in specific situation, example just before or just
after a new record is inserted and so on... remind that a r
Reminder of issue 354: http://code.google.com/p/web2py/issues/detail?id=354
I have never used a select trigger, so I only have vague ideas about how it
would be useful.
For inserts, a single line is sufficient. For deletes/update, that is not
true.
You can look at (todor's fixes to) my implem
Massimo, you got the point: event dispatched to each affected line. :-)
I see it working as conventional RDBMS triggers work as well. Not
more, not less.
--
Vinicius Assef.
On Wed, Oct 12, 2011 at 10:24 AM, Massimo Di Pierro
wrote:
> So basically the events are associated to the table and on
So basically the events are associated to the table and only apply to
single record event. This reduces the scope and makes things simple.
But is this what other people are asking?
On Oct 12, 12:18 am, guruyaya wrote:
> On Oct 12, 4:18 am, Massimo Di Pierro
> wrote:
>
> > As I said, the problem
On Oct 12, 4:18 am, Massimo Di Pierro
wrote:
> As I said, the problem is not the names or when they should be called.
> The problem is. What should be input and the output of each of these
> functions?
Whenever I'm in a problem with a full stack web framework, I think to
myself "what would cake
Don't forget on table creation and alteration.
On Oct 11, 11:57 pm, Bruno Rocha wrote:
> Would be nice to have some global events in web2py workflow. I can imagine
> some useful hooks:
>
> workflow global events:
>
> onrequest # before the execution of action/model
>
> prerender # after the execu
As I said, the problem is not the names or when they should be called.
The problem is. What should be input and the output of each of these
functions?
On Oct 11, 9:03 pm, Vinicius Assef wrote:
> I suggested it 2 years ago. I'll be happy if it come true someday, in web2py.
>
> I see it as database
I suggested it 2 years ago. I'll be happy if it come true someday, in web2py.
I see it as database triggers: before_ & after_. I.e:
before_insert, after_insert. Event can be: insert, update, delete,
query.
"before_insert" receives values that will be inserted on database. It
is the last chance to
may be a dictionary of tablename_event:function
I see that in DAL level this is very complicated.
but what about the resquest-response workflow events. I had cases where I
needed some global function to trigger before/after the template rendering
and final response.
http://zerp.ly/rochacbruno
E
the problem with this is not the names. ;-)
Consider the case of preupdate and onupdate.
db(db.person.age>18).update(can_drink=True)
What information should be passed to preupdate and update? tablename?
query? {'can_drink':True}? Number of affected records? Should there be
one onselect per ta
I like the idea!
+1
It is common in many frameworks. IMHO seems more common on compiled
languages frameworks for some reason.
mic
2011/10/11 Bruno Rocha :
> Would be nice to have some global events in web2py workflow. I can imagine
> some useful hooks:
>
> workflow global events:
>
> onrequest #
Would be nice to have some global events in web2py workflow. I can imagine
some useful hooks:
workflow global events:
onrequest # before the execution of action/model
prerender # after the execution of action/model but before the view
rendering
onrender # after the view render but before the ou
Not yet at the db level but at the form level:
form=SQLFORM(...).process(onsuccess=lambda form:...)
On Oct 11, 3:11 am, Manuele wrote:
> Hi,
> is there a way to trigger some functions on database eventes, for
> example on new record?
>
> thanks a lot
>
> Manuele
15 matches
Mail list logo