Hello,
any trigger syntax will do, e.g.:
create trigger BLUB AFTER INSERT on DB.DBA.RDF_QUAD REFERENCING NEW AS N
{
if(N.G IS NOT NULL AND N.S IS NOT NULL AND N.P IS NOT NULL AND N.O IS NOT
NULL)
{
INSERT INTO A_TRIPLETEST VALUES(N.G, N.S, N.P, N.O, now());
}
}
after executing this:
SPARQL
PREFIX : <http://test/test/>
INSERT INTO <http://test/test>
{
:HAND001 a :HAND;
:fingers "4"^^xsd:integer.
}
...the previously empty table A_TRIPLETEST will look like this:
G ANY S ANY P ANY O ANY Occ DATETIME
#i1220 #i9982721 #i1 #i9982722 2013-10-23 14:51:46
#i1220 #i9982721 #i9982723 4 2013-10-23 14:51:46
#i1220 #i9982721 #i1 #i9982722 2013-10-23 14:51:46
#i1220 #i9982721 #i9982723 4 2013-10-23 14:51:46
notice: no other trigger is active on this or the RDF_QUAD table
I'm playing around with triggers on the RDF_QUAD table for a while and
thought the double-insert is a feature since it was so commonplace.
I am using the pre-build 7.0 version for windows. This test was performed
on a freshly installed instance of virtuoso on Ubuntu to see if this would
happen on linux too.
Since this trigger-question is central to my bachelor-thesis, I would be
very grateful if someone could look into this.
Thank you,
Markus
2013/10/23 Jürgen Jakobitsch SWC <j.jakobit...@semantic-web.at>
> hi sebastian,
>
> is the source code of your trigger available to take a look at it?
>
> in any case, a "set triggers off;" might be useful [1].
>
> wkr jürgen
>
> [1] http://docs.openlinksw.com/virtuoso/TRIGGERS.html
>
> On Wed, 2013-10-23 at 11:55 +0200, Sebastian Tramp wrote:
> > On Wed, Oct 23, 2013 at 11:49:23AM +0200, Markus Freudenberg wrote:
> >
> > Dear list and Hugh esp.,
> >
> > one of our students here has an issue with insert triggers, can you
> please look
> > into it:
> >
> > > I noticed, that every triple inserted in the virtuoso quad-table will
> cause
> > > an insert trigger to fire twice (v. 7.0). Is this intended and does
> this
> > > happen to any triple without exception?
> >
> > Best regards
> >
> > Sebastian Tramp
> >
>
> --
> | Jürgen Jakobitsch,
> | Software Developer
> | Semantic Web Company GmbH
> | Mariahilfer Straße 70 / Neubaugasse 1, Top 8
> | A - 1070 Wien, Austria
> | Mob +43 676 62 12 710 | Fax +43.1.402 12 35 - 22
>
> COMPANY INFORMATION
> | web : http://www.semantic-web.at/
> | foaf : http://company.semantic-web.at/person/juergen_jakobitsch
> PERSONAL INFORMATION
> | web : http://www.turnguard.com
> | foaf : http://www.turnguard.com/turnguard
> | g+ : https://plus.google.com/111233759991616358206/posts
> | skype : jakobitsch-punkt
> | xmlns:tg = "http://www.turnguard.com/turnguard#"
>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users