可以将Pocketbase中的SQLite数据库修改为自己喜欢的样式吗?

huangapple go评论103阅读模式
英文:

Can the SQLite Database in Pocketbase be modified to your own liking?

问题

Pocketbase目前是我的BaaS解决方案,由于其灵活性,我可以使用Go语言更改/修改代码。我想知道是否可以更改默认的SQLite数据库,改用像MongoDB/Redis这样的数据库。

我已经查看了文件,但只找到了是/否的答案,没有解释。

英文:

Pocketbase is cunrretly my BaaS solution and due to its flexability I can change/modify the code using Go. I was wondering if I can change the defualt SQLite database and change to something like a MongoDB/Redis database.

I have dug through the files and found nothing but yes/no answers and not a explaination.

答案1

得分: 2

抱歉,目前似乎不支持这个功能。

Pocketbase在其常见问题解答页面中提到:

6. 我可以使用数据库X吗?

PocketBase使用嵌入式SQLite(在WAL模式下),目前没有支持其他数据库的计划。

此外,在这个问题中:

目前只支持SQLite。将来可能会添加对其他SQL数据库的支持,但目前这是一个非常低优先级的事项。

至于为什么,这是原因:

目前甚至考虑添加对其他SQL数据库的支持的主要原因是为了支持具有临时存储的云提供商,而不是因为扩展性(除了数据库之外,还有其他因素阻止PocketBase水平扩展,这是设计上的选择)。

我们没有计划支持Redis,因为为了最大化性能,我们在很大程度上依赖SQL语法(甚至将API规则转换为SQL语句)。

更多讨论请参见这里这里

英文:

Sorry mate not at this moment it seems.

Pocketbase states this at the of the FAQ page:

> 6. Can I use database X?
>
> PocketBase uses embedded SQLite (in WAL mode) and there are no plans for supporting other databases.

Additionally, in this issue:

> Currently only SQLite is supported. Support for other SQL databases may be added in the future but for now it is a very low priority.

As for to why, here is the reason:

> The main reason for now to even consider adding support for other SQL databases is to support cloud providers with ephemeral storage, not because of scaling (there are other things beside the database that prevents PocketBase to scale horizontally and this is by design).
>
> There are no plans for Redis, since to maximize the performance, we rely heavily on the SQL syntax (even the API rules are converted to SQL statements).

Futher discussions here and here.

huangapple
  • 本文由 发表于 2023年5月9日 08:26:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76205143.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定