CouchDB Library
Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 8322
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: CouchDB Library
I like to think of document stores as persistent arrays. They have the same name-value simplicity, but accessed from disk and so not limited to memory. But unlike arrays, they include options for querying, and automatically saving dynamically-updated query results in the form of "materialized views". And the better ones like CouchDB include powerful extras for replication across clusters if you need it (I don't, but it would be a good problem to have).
Richard Gaskin
Community volunteer LiveCode Community Liaison
LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Community volunteer LiveCode Community Liaison
LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: CouchDB Library
I will see what I can dig up in terms of a demo app
the data will ultimately arrive as an array with the documents you've accessed
in terms of populating fields etc... it wouldn't be much different than you would with any data source, which is to say you would need to write out that code e.g.:
put tResultsArray["record101"]["first name"] into field "firstName"
put tResultsArray["record101"]["last name"] into field "lastName"
once you get used to Mango (based on the MongoDB query system) searching documents is pretty easy, for example:
-- this would produce an array of names and emails of anyone born between 1970 and 1990
the data will ultimately arrive as an array with the documents you've accessed
in terms of populating fields etc... it wouldn't be much different than you would with any data source, which is to say you would need to write out that code e.g.:
put tResultsArray["record101"]["first name"] into field "firstName"
put tResultsArray["record101"]["last name"] into field "lastName"
once you get used to Mango (based on the MongoDB query system) searching documents is pretty easy, for example:
Code: Select all
put 19700101 into tQuery["selector"]["$and"][1]["$gte"]["birthdate"]
put 19901231 into tQuery["selector"]["$and"][1]["$lte"]["birthdate"]
put "name" into tQuery["fields"][1]
put "email" into tQuery["fields"][2]
put couch.post("find",theURL,theDBname,tQuery) into tResults
stam wrote: ↑Sun Nov 08, 2020 7:02 pmThanks @pink,
Daybed library for couchDB looks very interesting... but my mindset is so SQL focused i keep thinking in terms of SQL approach which is probably not optimal for couchDB.
Is anyone able to share an actual working stack with CRUD operations in action, populating list boxes, related fields, updating etc with couchDB? (sorry, i know i shouldn't say 'related'). Reading the API kinda makes sense but i keep thinking in terms of relational databases...
Would be really great if someone could share a stack where either couchDB and/or Daybed were used 'in real life'
Greg (pink) Miller
MadPink, LLC
I'm Mad, Pink and Dangerous to Know
MadPink, LLC
I'm Mad, Pink and Dangerous to Know
Re: CouchDB Library
By the way, over the last couple of weeks I've made a number of updates to the library, especially related to improving/optimizing the sync functions
Greg (pink) Miller
MadPink, LLC
I'm Mad, Pink and Dangerous to Know
MadPink, LLC
I'm Mad, Pink and Dangerous to Know
-
- VIP Livecode Opensource Backer
- Posts: 8322
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: CouchDB Library
Very valuable stuff - thank you!
Richard Gaskin
Community volunteer LiveCode Community Liaison
LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Community volunteer LiveCode Community Liaison
LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: CouchDB Library
Thanks Greg, that's really appreciated!
-
- Posts: 9
- Joined: Tue Jun 19, 2018 8:50 am
- Location: DE
CouchDB - Where to start?
Hi there
and sorry, if I'm ending up in the wrong category – I should definitely stick to the newbie corner, but on the other hand
my question is absolute CouchDB-related. I've read the posts, watched the YouTube video, purchased the udemy course,
downloaded the "CouchDB library" and I'm still don't able to get it to work.
CouchDB and LiveCode are running smoothly, but i'm failing just on installing the "library". There is no documentation?
In the meantime I stumbled across multiple different hints and docs, but I can't imagine that it's so hard to use a library?
(The extension builder does'nt work and crashes LiveCode at the end.)
I#m completely lost :-(
Thank you in advance
Jan
and sorry, if I'm ending up in the wrong category – I should definitely stick to the newbie corner, but on the other hand
my question is absolute CouchDB-related. I've read the posts, watched the YouTube video, purchased the udemy course,
downloaded the "CouchDB library" and I'm still don't able to get it to work.
CouchDB and LiveCode are running smoothly, but i'm failing just on installing the "library". There is no documentation?
In the meantime I stumbled across multiple different hints and docs, but I can't imagine that it's so hard to use a library?
(The extension builder does'nt work and crashes LiveCode at the end.)
I#m completely lost :-(
Thank you in advance
Jan