You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Started with #1345, though others have brought it up before.
Like most other relational databases, SQLite allows you to specify the schema for a given table when you create that table. However SQLite also allows you to write data of any type into any column of that table, regardless of the declared type of the column.
This behaviour can result rqlite returning ambiguous results, in certain cases. Take the following example:
As you can see, rqlite base64 encodes all blob data, when that data is included in a response. However, there is nothing preventing a literal string also being added to the data set, one that just happens to be a valid base64 value
In this case the caller of this API has no way to knowing if this value is really a BLOB value, or just a plain old string.
Proposed Solution
Add a new, optional, key to the rqlite response, named "vtypes". This type will contain the actual types for each value, on a row-by-row- basis. An example is shown below.
Problem
Started with #1345, though others have brought it up before.
Like most other relational databases, SQLite allows you to specify the schema for a given table when you create that table. However SQLite also allows you to write data of any type into any column of that table, regardless of the declared type of the column.
This behaviour can result rqlite returning ambiguous results, in certain cases. Take the following example:
As you can see, rqlite base64 encodes all blob data, when that data is included in a response. However, there is nothing preventing a literal string also being added to the data set, one that just happens to be a valid base64 value
In this case the caller of this API has no way to knowing if this value is really a BLOB value, or just a plain old string.
Proposed Solution
Add a new, optional, key to the rqlite response, named "vtypes". This type will contain the actual types for each value, on a row-by-row- basis. An example is shown below.
"vtypes" are optional because unless the data inserted actually differs from the "types" field, it bloats the response for no good reason.
The Associative response form would also be supported:
The text was updated successfully, but these errors were encountered: