public static OStatement get(String statement, ODatabaseDocumentInternal db) {
    """
	returns an already parsed SQL executor, taking it from the cache if it exists or creating a new one (parsing and then putting
	it into the cache) if it doesn't
	
	@param statement the SQL statement
	@param db        the current DB instance. If null, cache is ignored and a new executor is created through statement parsing
	
	@return a statement executor from the cache
    """
    if (db == null) {
      return parse(statement);
    }

    OStatementCache resource = db.getSharedContext().getStatementCache();
    return resource.get(statement);
  }
public static OStatement get(String statement, ODatabaseDocumentInternal db) {
    if (db == null) {
      return parse(statement);
    }

    OStatementCache resource = db.getSharedContext().getStatementCache();
    return resource.get(statement);
  }
public static OStatement get ( String statement , ODatabaseDocumentInternal db ) { if ( db == null ) { return parse ( statement ) ; } OStatementCache resource = db . getSharedContext ( ) . getStatementCache ( ) ; return resource . get ( statement ) ; }
returns an already parsed SQL executor, taking it from the cache if it exists or creating a new one (parsing and then putting
it into the cache) if it doesn't

@param statement the SQL statement
@param db        the current DB instance. If null, cache is ignored and a new executor is created through statement parsing

@return a statement executor from the cache
returns an already parsed SQL executor taking it from the cache if it exists or creating a new one ( parsing and then putting it into the cache ) if it doesn t