Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

[Documentation] get_list_continuous_queries() Python example #837

Copy link
Copy link
Open
@MrDiba

Description

@MrDiba
Issue body actions

I would love to see a example of the usage of the get_list_continuous_queries() function.

I'm currently building a function where I check if a continuous query exist, and if not I will create one.
The documentation is showing that the return will be a list of dictionaries. It would be great if the Python example contains a small example on how to deal with the list of dictonaries.

Example:

>> cqs = client.get_list_cqs()
>> cqs
[
    {
        u'db1': []
    },
    {
        u'db2': [
            {
                u'name': u'vampire',
                u'query': u'CREATE CONTINUOUS QUERY vampire ON '
                           'mydb BEGIN SELECT count(dracula) INTO '
                           'mydb.autogen.all_of_them FROM '
                           'mydb.autogen.one GROUP BY time(5m) END'
            }
        ]
    }
]

How would I get the name of the query in db2 if I do not know the position of db2?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.