[GH-ISSUE #88] Allow read-only access to the database #56

Closed
opened 2026-05-23 08:28:30 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @bernatesquirol on GitHub (Mar 24, 2022).
Original GitHub issue: https://github.com/appy-one/acebase/issues/88

Originally assigned to: @appy-one on GitHub.

It would be great to be able to reference as a read-only an already created storage-database.
A use case is using acebase as a "cache" in AWS Lambda, where the writing of files is forbidden, but the reading is allowed.

In short, being able to change this r+->r from function openDatabaseFile in storage-acebase.js
24ca5f2038/src/storage-acebase.js (L764)

Originally created by @bernatesquirol on GitHub (Mar 24, 2022). Original GitHub issue: https://github.com/appy-one/acebase/issues/88 Originally assigned to: @appy-one on GitHub. It would be great to be able to reference as a read-only an already created storage-database. A use case is using acebase as a "cache" in AWS Lambda, where the writing of files is forbidden, but the reading is allowed. In short, being able to change this `r+`->`r` from function `openDatabaseFile` in `storage-acebase.js ` https://github.com/appy-one/acebase/blob/24ca5f2038083a6c8f8fab6d29114a1c082a16d3/src/storage-acebase.js#L764
gitea-mirror 2026-05-23 08:28:30 -06:00
Author
Owner

@appy-one commented on GitHub (Apr 1, 2022):

I just published v1.16.0 which supports this, simply pass readOnly: true in the storage settings:

const db = new AceBase('mydb', { storage: { readOnly: true } });

Let me know if it works!

<!-- gh-comment-id:1085838307 --> @appy-one commented on GitHub (Apr 1, 2022): I just published v1.16.0 which supports this, simply pass `readOnly: true` in the `storage` settings: ```js const db = new AceBase('mydb', { storage: { readOnly: true } }); ``` Let me know if it works!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#56
No description provided.