Tabnine Logo
QueryExecutionKernelException
Code IndexAdd Tabnine to your IDE (free)

How to use
QueryExecutionKernelException
in
org.neo4j.kernel.impl.query

Best Java code snippets using org.neo4j.kernel.impl.query.QueryExecutionKernelException (Showing top 20 results out of 315)

origin: neo4j/neo4j

@Override
public Result executeQuery( String query, MapValue parameters, TransactionalContext context )
    throws QueryExecutionKernelException
{
  try
  {
    return inner.execute( query, parameters, context, false );
  }
  catch ( CypherException e )
  {
    throw new QueryExecutionKernelException( e );
  }
}
origin: neo4j/neo4j

  public QueryExecutionException asUserException()
  {
    return new QueryExecutionException( getMessage(), this, status().code().serialize() );
  }
}
origin: neo4j/neo4j

  private static QueryExecutionException converted( CypherException e )
  {
    return new QueryExecutionKernelException( e ).asUserException();
  }
}
origin: neo4j/neo4j

@Test
public void failQueryAfterMaxRetriesReached() throws QueryExecutionKernelException
{
  when( versionContext.isDirty() ).thenReturn( true );
  try
  {
    executionEngine.executeWithRetries( "query", Collections.emptyMap(), transactionalContext, executor );
  }
  catch ( QueryExecutionKernelException e )
  {
    assertEquals( "Unable to get clean data snapshot for query 'query' after 5 attempts.", e.getMessage() );
  }
  verify( executor, times( 5 ) ).execute( any(), anyMap(), any() );
  verify( versionContext, times( 5 ) ).initRead();
}
origin: neo4j/neo4j

@Override
public Result executeQuery( String query, MapValue parameters, TransactionalContext tc )
{
  try
  {
    availability.assertDatabaseAvailable();
    return sourceModule.neoStoreDataSource.getExecutionEngine().executeQuery( query, parameters, tc );
  }
  catch ( QueryExecutionKernelException e )
  {
    throw e.asUserException();
  }
}
origin: neo4j/neo4j

@Test
void shouldThrowOnCommitInAutoCommit() throws Exception
{
  QueryExecutionKernelException e = assertThrows( QueryExecutionKernelException.class, () ->
      TransactionStateMachine.State.AUTO_COMMIT.commitTransaction( mutableState, stateMachineSPI ) );
  assertEquals( "No current transaction to commit.", e.getMessage() );
}
origin: neo4j/neo4j

@Override
public Result executeQuery( String query, MapValue parameters, TransactionalContext transactionalContext )
{
  try
  {
    availability.assertDatabaseAvailable();
    return dataSource.neoStoreDataSource.getExecutionEngine().executeQuery( query, parameters, transactionalContext );
  }
  catch ( QueryExecutionKernelException e )
  {
    throw e.asUserException();
  }
}
origin: neo4j/neo4j

@Override
public Result profileQuery( String query, MapValue parameters, TransactionalContext context )
    throws QueryExecutionKernelException
{
  try
  {
    return inner.execute( query, parameters, context, true );
  }
  catch ( CypherException e )
  {
    throw new QueryExecutionKernelException( e );
  }
}
origin: neo4j/neo4j

private void checkIfDirty()
{
  if ( versionContext.isDirty() )
  {
    throw new QueryExecutionKernelException(
        new UnstableSnapshotException( "Unable to get clean data snapshot for query serialisation." ) )
        .asUserException();
  }
}
origin: neo4j/neo4j

@Test
void shouldThrowOnBeginInExplicitTransaction() throws Exception
{
  QueryExecutionKernelException e = assertThrows( QueryExecutionKernelException.class, () ->
      TransactionStateMachine.State.EXPLICIT_TRANSACTION.beginTransaction( mutableState, stateMachineSPI, null, null, null ) );
  assertEquals( "Nested transactions are not supported.", e.getMessage() );
}
origin: org.neo4j/neo4j-kernel

  public QueryExecutionException asUserException()
  {
    return new QueryExecutionException( getMessage(), this, status().code().serialize() );
  }
}
origin: org.neo4j/neo4j

@Override
public Result executeQuery( String query, MapValue parameters, TransactionalContext transactionalContext )
{
  try
  {
    availability.assertDatabaseAvailable();
    return dataSource.neoStoreDataSource.getExecutionEngine().executeQuery( query, parameters, transactionalContext );
  }
  catch ( QueryExecutionKernelException e )
  {
    throw e.asUserException();
  }
}
origin: neo4j/neo4j

@Override
State beginTransaction( MutableTransactionState ctx, TransactionStateMachineSPI spi, Bookmark bookmark, Duration txTimeout,
    Map<String,Object> txMetadata ) throws KernelException
{
  throw new QueryExecutionKernelException( new InvalidSemanticsException( "Nested transactions are not supported." ) );
}
origin: org.neo4j/neo4j-cypher

  private static QueryExecutionException converted( CypherException e )
  {
    return new QueryExecutionKernelException( e ).asUserException();
  }
}
origin: org.neo4j/neo4j-shell

private void handleException( Output out, QueryExecutionKernelException exception, long startTime )
    throws RemoteException
{
  out.println( (now() - startTime) + " ms" );
  out.println();
  out.println( "WARNING: " + exception.getMessage() );
}
origin: org.neo4j/neo4j

@Override
public Result executeQuery( String query, MapValue parameters, TransactionalContext tc )
{
  try
  {
    availability.assertDatabaseAvailable();
    return sourceModule.neoStoreDataSource.getExecutionEngine().executeQuery( query, parameters, tc );
  }
  catch ( QueryExecutionKernelException e )
  {
    throw e.asUserException();
  }
}
origin: neo4j/neo4j

private Result throwQueryExecutionException( String message, Object... parameters ) throws
    QueryExecutionKernelException
{
  throw new QueryExecutionKernelException( new UnstableSnapshotException( message, parameters ) );
}
origin: org.neo4j/neo4j-cypher

private void checkIfDirty()
{
  if ( versionContext.isDirty() )
  {
    throw new QueryExecutionKernelException(
        new UnstableSnapshotException( "Unable to get clean data snapshot for query serialisation." ) )
        .asUserException();
  }
}
origin: neo4j/neo4j

@Override
State commitTransaction( MutableTransactionState ctx, TransactionStateMachineSPI spi ) throws KernelException
{
  throw new QueryExecutionKernelException( new InvalidSemanticsException( "No current transaction to commit." ) );
}
origin: neo4j/neo4j

@Override
public BoltResult start() throws KernelException
{
  try
  {
    Result result = queryExecutionEngine.executeQuery( statement, params, transactionalContext );
    if ( result instanceof QueryResultProvider )
    {
      return newBoltResult( (QueryResultProvider) result, clock );
    }
    else
    {
      throw new IllegalStateException( format( "Unexpected query execution result. Expected to get instance of %s but was %s.",
                           QueryResultProvider.class.getName(), result.getClass().getName() ) );
    }
  }
  catch ( KernelException e )
  {
    close( false );
    throw new QueryExecutionKernelException( e );
  }
  catch ( Throwable e )
  {
    close( false );
    throw e;
  }
}
org.neo4j.kernel.impl.queryQueryExecutionKernelException

Most used methods

  • <init>
  • getMessage
  • asUserException
  • status

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now