Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] CQEngine: Query nested object using parser.retrieve #281

Open
Ravipillala opened this issue Mar 1, 2021 · 1 comment
Open

Comments

@Ravipillala
Copy link

I have a nested object like following... I would like to query the collection of SQSObjects by applying a filter like

ResultSet<SQSMessage> results = parser.retrieve(indexedSQSMessage, "SELECT * FROM indexedSQSMessage WHERE type='income' and DomainAttributes.saveType in ('endSession', 'cancelled')or (DomainAttributes.countryCode is null or DomainAttributes.countryCode='US'");

Is that possible using CQEngine? if yes.. please send me the examples.

Reason why I want o make that as sql... where clause is dynamic for various usecases.

    private String type;
    private boolean isEntity;
    private String eventType;
    private SystemInfo systemInfo;
    private DomainAttributes domainAttributes;

    @Data
    public static class SystemInfo implements Serializable {
        private String identifier;
        private String ownedBy;
        private Payload payload;
        private EntityTags entityTags;
        private long createdOn;
        private String createdBy;
        private long version;
        private long lastUpdatedOn;
        private String lastUpdatedBy;
        private String attrEncKeyName;

        @Data
        public static class Payload implements Serializable {
            private String bucketName;
            private String objName;
            private String encKeyName;
            private byte[] payloadBytes;
            private byte[] decryptedBytes;
            private byte[] sanitizedBytes;
        }
        @Data
        public static class EntityTags implements Serializable {
            private List<Tag> tags;
            @Data
            public static class Tag implements Serializable {
                private String tagName;
                private String tagValue;
            }
        }
    }
    @Data
    public static class DomainAttributes implements Serializable {
        private String updatedByAuthId;
        private String saveType;
        private String docName;
        private String ceDataType;
        private String year;
        private String appId;
        private String formSetId;
        private String appSku;
        private String deviceId;
        private String deviceName;
    }
}```
@Ravipillala
Copy link
Author

@npgall I'm looking for a solution for query nested objects. can you please respond when you get sometime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant