sqlitebrowser / dbhub.io

A "Cloud" for SQLite databases. Collaborative development for your data. 😊
https://dbhub.io
GNU Affero General Public License v3.0
371 stars 39 forks source link

[Suggestion] New Function "About" for DBHub.io metadata #237

Open PJOttCanHome opened 9 months ago

PJOttCanHome commented 9 months ago

It might be useful for applications to request the current state of DBHub.io, itself. I was thinking it could return something like this:

{
    "SQLiteVersion" : "3.x",
    "APIVersion" : ""v1",
    "Build" : "1.56.3",
    "Parameters" : [ 
        {"Name" : "dbname", "Type" : "String"},
        {"Name" : "table", "Type" : "String"},
        {"Name" : "live", "Type" : "Boolean"},
        {"Name" : "sql", "Type": "Base64"} /* etc */
    ],
    "Functions" : [
        {"Name" : "About", "ParamNames": [] },
        {"Name" : "Databases", "ParamNames": [] },
        {"Name" : "Tables", "ParamNames": ["dbname"] },
        {"Name" : "Query", "ParamNames": ["dbname","sql"] } /* etc */
    ],
    "ChangeHistory" : [
        {"Build" : "1.56", "Date" : "2023-12-20", "Info" : "We fixed more things"},
        {"Build" : "1.53", "Date" : "2023-12-15", "Info" : "We fixed a lot of things"},
        {"Build" : "1.50", "Date" : "2023-12-10", "Info" : "We fixed things"}
    ]
}

And it might be best to restrict the extra info based on a Boolean "verbose" parameter. Using the verbose results from this function people could create/run their own tests.

justinclift commented 9 months ago

Interesting idea, could be useful.

Probably not super hard to implement either. Let me think it over a bit. :smile: