Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

expose isEmbedded property #128

Closed
wants to merge 1 commit into from
Closed

Conversation

dominictarr
Copy link
Contributor

expose an isEmbedded property, realized that this can be a property, not a function.

Level/levelup#279

@mcollina
Copy link
Member

👍 for the property.

@nolanlawson
Copy link

Are we sure this can be a property? In the case of sqlDOWN, I believe it can work with Postgres/MySQL/SQLite/WebSQL, i.e. a mix of embedded and non-embedded. @calvinmetcalf can you confirm that this would be okay?

Also, let's please open a PR or an issue on *down libraries to remind them to add this. I'm guessing the majority of *down libraries are embedded, so it's kind of unfortunate that we can't reverse the semantics here, but I cannot think of a good antonym for "embedded," so here we are.

Off the top of my head:

  • sqlDOWN
  • localstorage-down
  • memdown
  • level variants (rocksdb, basho's fork)
  • jsondown
  • level.js and the other IndexedDB one
  • medeadown

It'd be nice to all be on the same page about this.

@calvinmetcalf
Copy link

if it is to be a property of a db instance that that isn't a problem for sqldown to do

@calvinmetcalf
Copy link

ah but an issue for sqldown, assuming by isEmbedded you mean single process (e.g. sole connection to db) then that could be tricky, for instance sqlite3 is embedded but multiple processes can attach to it (e.g. wouldn't throw an error if you used it with cluster) but on the other hand @maxogden is using sqldown with postgres due to heroku's ephemeral fire structure, in other words like a remote embeded db.

@rvagg
Copy link
Member

rvagg commented Oct 2, 2014

I think this should be done in abstract-leveldown first as a conformance test, as per Level/levelup#279

@dominictarr
Copy link
Contributor Author

in the other thread we decided that "exclusive access" was a better term for what we are getting at here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants