public object Execute(Expression expression) { IOqlExpressionVisitor visitor = m_data_provider.CreateExpressionVisitor().ExecuteVisit(expression); switch (visitor.Context.CallResult.Command) { case OqlCommandToken.Exec: return(ExecuteCommand(visitor)); case OqlCommandToken.Scalar: return(GetScalar(visitor)); default: return(ObjectQueryNavigator.CreateResult(visitor.Context.CallResult, m_data_provider.GetDataSource(), visitor.Query)); } }
public async Task <object> ExecuteAsync(Expression expression) { IOqlExpressionVisitor visitor = m_data_provider.CreateExpressionVisitor().ExecuteVisit(expression); switch (visitor.Context.CallResult.Command) { case OqlCommandToken.Exec: return(await ExecuteCommandAsync(visitor)); case OqlCommandToken.Scalar: return(await GetScalarAsync(visitor)); default: return(await ObjectQueryNavigator.CreateResultAsync(visitor.Context.CallResult, m_data_provider.GetDataSource(), visitor.Query)); } }