import uuid


def get_db_data(db_owner):
    """This function returns the database details in dict format"""
    data = {
        "datconnlimit": -1,
        "datowner": db_owner,
        "deffuncacl": [{
            "grantee": db_owner,
            "grantor": db_owner,
            "privileges": [{
                "privilege_type": "X",
                "privilege": True,
                "with_grant": False
            }]
        }],
        "defseqacl": [{
            "grantee": db_owner,
            "grantor": db_owner,
            "privileges": [{
                "privilege_type": "r",
                "privilege": True,
                "with_grant": False
            }, {
                "privilege_type": "w",
                "privilege": True,
                "with_grant": False
            }, {
                "privilege_type": "U",
                "privilege": True,
                "with_grant": False
            }]
        }],
        "deftblacl": [{
            "grantee": db_owner,
            "grantor": db_owner,
            "privileges": [{
                "privilege_type": "a",
                "privilege": True,
                "with_grant": True
            }, {
                "privilege_type": "r",
                "privilege": True,
                "with_grant": False
            }]
        }],
        "deftypeacl": [{
            "grantee": db_owner,
            "grantor": db_owner,
            "privileges": [{
                "privilege_type": "U",
                "privilege": True,
                "with_grant": False
            }]
        }],
        "encoding": "UTF8",
        "name": "db_add_%s" % str(uuid.uuid4())[1: 8],
        "privileges": [],
        "securities": [],
        "variables": [],
        "schema_res": ["public", "sample"]
    }
    return data