code: function closeOrderContext (select) {
      // only operate if in order context
      if (select.context !== 'order') {
          return
      }
      // debug
      debug('closeOrderContext', select.contextData)
      // get columns to order by
      var columns = select.contextData.columns
      // must have columns in order to create order statement
      if (!Array.isArray(columns) || !columns.length) {
          // there is a direction with no column or there
          // are no order clauses in query then throw error
          if (!select.query.order || select.query.order.length === 0 || select.contextData.direction) {
              throwError('order must have columns', select)
          }
          // there is nothing in context that needs to be added to query
          else {
              return
          }
      }
      // if there is a direction then add to columns
      if (select.contextData.direction) {
          columns.push(select.contextData.direction)
      }
      // make sure query has order
      if (!select.query.order) {
          select.query.order = []
      }
      // add order caluse to query
      select.query.order.push(columns)
      // reset contextData
      select.contextData = {}
  }
docs: /* private functions 
  @function closeOrderContext
  
  create order condition from order context
  
  @param {object} select
  
  @throws {Error}