2024-01-10 09:49:34 -05:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package metadata;
|
|
|
|
|
|
|
|
// Database config used to send db configs over the wire and stored
|
|
|
|
// in the meta store.
|
|
|
|
message DatabaseConfig {
|
|
|
|
bool block_reads = 1;
|
|
|
|
bool block_writes = 2;
|
|
|
|
// The reason why operations are blocked. This will be included in [`Error::Blocked`].
|
|
|
|
optional string block_reason = 3;
|
|
|
|
// maximum db size (in pages)
|
|
|
|
uint64 max_db_pages = 4;
|
|
|
|
optional string heartbeat_url = 5;
|
|
|
|
optional string bottomless_db_id = 6;
|
2024-01-11 09:42:38 -05:00
|
|
|
optional string jwt_key = 7;
|
2024-01-18 20:50:02 +01:00
|
|
|
optional uint64 txn_timeout_s = 8;
|
libsql: attach databases from other namespaces as readonly (#784)
* libsql: attach databases from other namespaces as readonly
With this proof-of-concept patch, other namespaces hosted
on the same sqld machine can now be attached in readonly mode,
so that users can read from other databases when connected
to a particular one.
* connection: add allow_attach to config
Default is false, which means connections are blocked from attaching
databases. If allowed, colocated databases can be attached in readonly
mode.
Example:
→ attach another as another; select * from another.sqlite_master;
TYPE NAME TBL NAME ROOTPAGE SQL
table t3 t3 2 CREATE TABLE t3(id)
* libsql,namespaces: add client-side ATTACH support
* attach: support ATTACH x AS y aliasing
We're going to need it, because the internal database names in sqld
are uuids, and we don't expect users to know or use them.
* attach: fix quoted db names
In libsql-server, raw db names are uuids that need to be quoted,
so that needs to be supported in the ATTACH layer.
As a bonus, "names" that are actually file system paths are refused
to prevent abuse.
* libsql-server: drop stray serde(default) from allow_attach
* libsql-replication: update proto files
* libsql-replication: regenerate protobuf
* tests: move attach to its own test
* libsql-replication: fix proto number after rebase
2024-02-14 11:41:45 +01:00
|
|
|
bool allow_attach = 9;
|
2024-02-20 13:45:24 +01:00
|
|
|
optional uint64 max_row_size = 10;
|
2024-02-20 15:21:55 +01:00
|
|
|
optional bool shared_schema = 11;
|
|
|
|
optional string shared_schema_name = 12;
|
2024-01-10 09:49:34 -05:00
|
|
|
}
|