code: @Override
      public Cursor onQuery(T helper, SQLiteDatabase db, MatcherPattern target, QueryParameters parameter) {
          Cursor result = null;
  
          SQLiteQueryBuilder builder = new SQLiteQueryBuilder();
          builder.setTables(target.getTableInfo().getName());
          builder.setProjectionMap(target.getTableInfo().getProjectionMap());
  
          // where
          switch (target.getMimeTypeVnd().getSubType()) {
  
              case ITEM:
                  // Add item selection criteria (using StringBuilder via appendWhere)
                  // URI parameter type not set at this level of the class hierarchy, but it is
                  // assumed to be numeric so value not escaped.
                  builder.appendWhere(target.getTableInfo().getIdColumnInfo().getColumnName());
                  builder.appendWhere("=");
                  builder.appendWhere(parameter.getUri().getPathSegments().get(1));
                  break;
  
              case DIRECTORY:
              default:
                  break;
          }
  
          // orderBy
          String orderBy = getSortOrderStringForQuery(target, parameter);
  
          result = builder.query(db, parameter.getProjection(), parameter.getSelection(), parameter.getSelectionArgs(),
              null, null, orderBy);
          return result;
      }
docs: /*
  @see
  com.tojc.ormlite.android.OrmLiteDefaultContentProvider#onQuery(com.j256
  .ormlite.android.apptools .OrmLiteSqliteOpenHelper,
  com.tojc.ormlite.android.framework.MatcherPattern,
  com.tojc.ormlite.android.framework.OperationParameters.QueryParameters)