public static OExecutionPlan get ( String statement , OCommandContext ctx , ODatabaseDocumentInternal db ) { if ( db == null ) { throw new IllegalArgumentException ( "DB cannot be null" ) ; } if ( statement == null ) { return null ; } OExecutionPlanCache resource = db . getSharedContext ( ) . getExecutionPlanCache ( ) ; OExecutionPlan result = resource . getInternal ( statement , ctx , db ) ; return result ; }
returns an already prepared SQL execution plan taking it from the cache if it exists or creating a new one if it doesn t