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

Get list of databases created 30 days ago? #291

Open
paarth1995 opened this issue Apr 12, 2021 · 0 comments
Open

Get list of databases created 30 days ago? #291

paarth1995 opened this issue Apr 12, 2021 · 0 comments

Comments

@paarth1995
Copy link

Hey guys, i am new to using pyorient and trying to get list of databases and that has worked using client.db_list(). However, i am wondering how can i get list of databases 30 days and older?

This is my code so far :-


import pyorient


def list_orient_databases(name):
    # Use a breakpoint in the code line below to debug your script.
    print(f'{name}')
    client = pyorient.OrientDB("10.191.6.48", 2323)
    session_id = client.connect("user", "pass")
    db_names = client.db_list().__getattr__('databases')

    db_count = 0

    for db_name in db_names:
        print(db_name)

This prints out the list of databases, however how can i get databases created 30 days ago? Thank you

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