Skip to content

Latest commit

 

History

History
151 lines (117 loc) · 2.53 KB

README.md

File metadata and controls

151 lines (117 loc) · 2.53 KB

JQL ⚙️

It combines SQL's speed and JSON's flexibility.

SQL + JSON = JQL ⚙️

📖 Instructions

All JQL tables have two columns, Key and Value, value is json.

image

different types of data are stored in different files instead of tables, like this:

jql("books.db") jql("films.db") jql("user datas.db") etc...

📚 Examples

✏️ Write

jql("my_database.db").write("eikosa.books.literature.Dostoyevsky","Crime and Punishment")

Value is:

{
    "books": {
        "literature": {
            "Dostoyevsky": "Crime and Punishment"
        }
    }
}

jql("my_database.db").write("eikosa.books.literature.tolstoy","")

Returns:

{
    "books": {
        "literature": {
            "Dostoyevsky": "Crime and Punishment",
            "tolstoy": ""
        }
    }
}

jql("my_database.db").write("eikosa.books.literature.george orwell",["1984", "Animal Farm"])

Returns:

{
    "books": {
        "literature": {
            "Dostoyevsky": "Crime and Punishment",
            "tolstoy": "",
            "george orwell": [
                "1984", 
                "Animal Farm"
            ]                
        }
    }
}

jql("my_database.db").write("eikosa","is a programmer")

Value is:

{
    "is a programmer": ""
}

📖 Read

jql("my_database.db").read("eikosa.books.literature")

Returns:

{'Dostoyevsky': 'Crime and Punishment'}

🗑 Delete Path Element

jql("my_database.db").del("eikosa.books.literature.tolstoy")

Before:

{
    "books": {
        "literature": {
            "Dostoyevsky": "Crime and Punishment",
            "tolstoy": ""
        }
    }
}

After:

{
    "books": {
        "literature": {
            "Dostoyevsky": "Crime and Punishment"
        }
    }
}

jql("my_database.db").del("eikosa.books.literature")

Before:

{
    "books": {
        "literature": {
            "Dostoyevsky": "Crime and Punishment",
            "tolstoy": ""
        }
    }
}

After:

{
    "books": {}
}

💥 Delete Value

jql("my_database.db").delete_key("eikosa")

image


🔎 Search

🔜