synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiranya Jayathilaka (JIRA)" <>
Subject [jira] Commented: (SYNAPSE-457) allow dbreport mediator to have a result
Date Mon, 20 Sep 2010 11:36:33 GMT


Hiranya Jayathilaka commented on SYNAPSE-457:

There are actually multiple problems to be addressed here:

1. There is no one standard way which works on all database management systems for getting
the last insert ID
2. Transactionality
3. Different users will want to get different return values (some will want the last insert
ID, some will want the number of records inserted etc)

One solution is to introduce something like a post-DBreport hook. This is a special user defined
query which is executed immediately after the SQL insert/update. The return value can be set
on the message context as a property. I will look into this in the near future. 

But IMO this is definitely 2.1 material.

> allow dbreport mediator to have a result
> ----------------------------------------
>                 Key: SYNAPSE-457
>                 URL:
>             Project: Synapse
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: harm verhagen
>            Assignee: Hiranya Jayathilaka
> Feature request.
> allow dbreport to also have return values (result).
> reason:
> Currently there is no clean (threadsafe) way to obtain the ID of a newly created row
in a table. (id is an AUTO_INCREMENT table value).
> There are functions to obtain the last ID (mysql: LAST_INSERT_ID() ) But these work _only_
in the same transaction. (so in the _same_ dbreport mediator, as where the insert happens)
> For more elaborate problem description see:
> proposed solution (indika at )

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message