Giter Site home page Giter Site logo

siddhi-json-structs's People

Contributors

moizmali avatar

Forkers

senthuran16

siddhi-json-structs's Issues

Capitalize all fixed string values

There are places where fixed strings are used.

Eg: Window-Filter-Projection input type query's config is:

{
    type*: 'window-filter-projection',
    ...
}

Changing the type as WINDOW_FILTER_PROJECTION will make it easier to define enums and use.

Every such fixed strings can be named in this manner.

Note: Anyhow, comparisons are case insensitive

Improvement for pattern query input type config

JSON structure for the Pattern Query Input type is currently as follows:

{
    type*: 'pattern',
    eventList*: [
        {
            type*: 'default | andor | notfor | notand',
            value*: {Default JSON | ANDOR JSON | NOTFOR JSON | NOTAND JSON}
        },
        ...
    ]
}

Here, the type and value of a member in the eventList are transitively dependent. Isn't it good to make it like this:

{
    type*: 'pattern',
    eventList*: [
        {Default JSON | ANDOR JSON | NOTFOR JSON | NOTAND JSON},
        ...
    ]
}

And the Default JSON will be as follows:

{
    type*: 'default'
    forEvery*: 'true|false',
    eventReference: '',
    streamName*: '',
    filter: '',
    minCount: '',
    maxCount: ''
} 

ANDOR, NOTFOR & NOTAND will be having type inside them

Select in query in not mandatory.

A query without a select clause can exists.
Check in the following siddhi app in Product- SP.

@App:name("sample")
@App:description("Description of the plan") 

define stream TradeStream (symbol string, price double, volume long, timestamp long);

from TradeStream
insert into b;

Aggregation Definition - Rename Timestamp variable

    aggregateBy: {
        timeStamp: 'timestamp',   // NOTE HERE
        timePeriod: 'sec...year'
    },
    store: {},
    annotationList: []
}

Can we replace timestamp with attribute?
Then it'll be

    aggregateBy: {
        attribute: 'timestamp',   // NOTE HERE
        timePeriod: 'sec...year'
    }

The Siddhi runtime identifies the variable as aggregateAttribute

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.