本文整理了Java中org.eclipse.rdf4j.repository.RepositoryConnection.isAutoCommit
方法的一些代码示例,展示了RepositoryConnection.isAutoCommit
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RepositoryConnection.isAutoCommit
方法的具体详情如下:
包路径:org.eclipse.rdf4j.repository.RepositoryConnection
类名称:RepositoryConnection
方法名:isAutoCommit
[英]Indicates if the connection is in auto-commit mode. The connection is in auto-commit mode when no transaction is currently active, that is, when:
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
/**
* @deprecated since release 2.7.0. Use {@link #isActive()} instead.
*/
@Override
@Deprecated
public boolean isAutoCommit()
throws RepositoryException
{
return getDelegate().isAutoCommit();
}
代码示例来源:origin: eclipse/rdf4j
/**
* @deprecated since release 2.7.0. Use {@link #isActive()} instead.
*/
@Override
@Deprecated
public boolean isAutoCommit()
throws RepositoryException
{
return getDelegate().isAutoCommit();
}
代码示例来源:origin: franzinc/agraph-java-client
@Test
public void testConsecutiveUpdatesInSameTransaction()
throws Exception {
// this tests if consecutive updates in the same transaction behave
// correctly. See issue SES-930
logger.debug("executing test testConsecutiveUpdatesInSameTransaction");
StringBuilder update1 = new StringBuilder();
update1.append(getNamespaceDeclarations());
update1.append("DELETE { ?x foaf:name ?y } WHERE {?x foaf:name ?y }");
boolean autoCommit = con.isAutoCommit();
con.setAutoCommit(false);
Update operation = con.prepareUpdate(QueryLanguage.SPARQL, update1.toString());
assertFalse(con.hasStatement(bob, RDFS.LABEL, f.createLiteral("Bob"), true));
assertFalse(con.hasStatement(alice, RDFS.LABEL, f.createLiteral("Alice"), true));
operation.execute();
// update should be visible to own connection.
assertFalse(con.hasStatement(bob, FOAF.NAME, f.createLiteral("Bob"), true));
assertFalse(con.hasStatement(alice, FOAF.NAME, f.createLiteral("Alice"), true));
StringBuilder update2 = new StringBuilder();
update2.append(getNamespaceDeclarations());
update2.append("INSERT { ?x rdfs:label ?y } WHERE {?x foaf:name ?y }");
operation = con.prepareUpdate(QueryLanguage.SPARQL, update2.toString());
operation.execute();
// update should not have resulted in any inserts: where clause is empty.
assertFalse(con.hasStatement(bob, RDFS.LABEL, f.createLiteral("Bob"), true));
assertFalse(con.hasStatement(alice, RDFS.LABEL, f.createLiteral("Alice"), true));
con.setAutoCommit(autoCommit);
}
代码示例来源:origin: franzinc/agraph-java-client
update.append("DELETE { ?x foaf:name ?y } INSERT {?x rdfs:label ?y . } WHERE {?x foaf:name ?y }");
boolean autoCommit = con.isAutoCommit();
内容来源于网络,如有侵权,请联系作者删除!