schematic icon indicating copy to clipboard operation
schematic copied to clipboard

How to use path value in WHERE clause?

Open actionuiuc opened this issue 7 years ago • 0 comments

Hi, I believe this has been asked in a couple different ways, but I don't see any answer. I'll try to summarize. Is it possible to use a value such as 'expTime' below(pathSegment = 4) in the ? of the 'where' clause? I would want the whereColumn to compare with pathSegment value 2 and the where to use pathSegment 4.

    @InexactContentUri(
            path = Path.ITEMS + "/" + Path.NOTIFY_FLAG + "/#/" + Path.EXPIRE_NOTIFY + "/#",
            name = "ITEM_EXPIRE_LESS",
            type = "vnd.android.cursor.item/item",
            whereColumn = ItemColumns.ITEM_NOTIFY,
            where = "item_exp_date < ?",
            pathSegment = {2,4})
    public static Uri withExp(long expTime) {
        return buildUri(Path.ITEMS, Path.NOTIFY_FLAG, "1", Path.EXPIRE_NOTIFY, String.valueOf(expTime));
    }

Thanks,

Brian

actionuiuc avatar Feb 01 '18 18:02 actionuiuc