-
1. Re: Handling relative dates with arquillian-persistence-extension
bmajsak Apr 9, 2014 6:13 AM (in response to tournqat)Hi Daniel,
I'm working on scriptable datasets for the next release (hoping to release it within next few weeks) - you can watch the issue here [ARQ-1332] Should be able to script data in the data sets - JBoss Issue Tracker
This will be based on SPI model so you will be able to provide any kind of custom logic for resolving dynamic values as you wish.
Can you share your custom table - maybe we can think of providing such functionality too and if you are interested I can help you with the contribution That would be simply awesome.
Cheers,
Bartosz
-
2. Re: Re: Handling relative dates with arquillian-persistence-extension
tournqat Jun 19, 2014 9:39 AM (in response to bmajsak)Hi Bartosz,
You can look at my custom Table here: https://gist.github.com/tourn/10254637 (I've ripped it out of our application and stripped irrelevant things, let me know if anything's missing)
It feels quite hacky, but it does the job.
On a side note, another feature I'm looking for/wanting to contribute is a dynamic way of disabling database triggers, based on the tables contained in the dataset. But It's probably better to start another discussion for that.
Cheers,
Daniel
-
3. Re: Re: Handling relative dates with arquillian-persistence-extension
bmajsak Apr 9, 2014 7:13 AM (in response to tournqat)Cool, thanks a lot. Feel free to open separated discussion about new feature so that we can nail down all the bits and pieces.
Cheers!
-
4. Re: Re: Handling relative dates with arquillian-persistence-extension
tournqat Jun 20, 2014 8:52 AM (in response to bmajsak)I've been on IRC with Aslak and he told me to state my needs here. He also sounded like you're pretty much done with your implementation of scriptable datasets, so I'm not sure whether my try at this is of use.
Anyway, here it is: I've tried implementing this feature by creating a ReplacementProvider SPI (see https://github.com/tourn/arquillian-extension-persistence/commit/5faeaac5b6d49dde775514dc2ac70331c1b43ec5)
This works pretty well for me: create a jar containing some ReplacementProvider implementations and I'm good to go.
However, as previously mentioned, one use case for me is pulling sequence values out of our database. For this I'd like access to APEs DataSource. I know it's around, but I didn't manage to get it into my Service yet.
Whether it's your implementation or mine, I need the possibility to query APEs database connection to retrieve Oracle sequences, so these values can be dynamically put into the dataset.
Cheers,
Daniel