-
trying to get started with a simple json-db
From
Garth Grudge@VERT/GRUDGEDU to
All on Sat Feb 22 13:55:58 2014
Hi everyone, I decided to post my question in doveNET because my question isãsomewhat general and maybe could be of use to people at a later date. ãBasically, I'm just trying to get acquainted with setting up a basic DB to holdãsome user values with the user number acting as the index or primary key. ããI've got a couple js files that create json-db's, such as synchronetris orãuberblox, however, after browsing the code, I couldn't find any reference toãthe creation of the db. I've noticed if you add a DB service in theãservices.ini it does not actually create the database at that point afterãchecking the directories. Anyhow, if there's a point in the code or aãdependency I'm not looking at, I'm willing to investigate that rather than relyãon doveNET for the answer, but should doveNET be so kind as to provide a littleãcode to get me started, here's what I'd like to be able to do without beingãoverly complex :ãã1. Create a test json-dbã2. Write a value to the db using USERID number as an index valueã3. Retrieve that value from the DBããOut of these 3, #1 is obviously the most important. I think I can figure outãhow to work with the DB once it exists as I've read up on JSON schema and readãover json-db at least once(and will probably do a couple more times). ããThanks for any help in advance,ãgrudgeãã---ã þ Synchronet þ \1yF\1mU\1cT\1wU\1rR\1gELand : \1w find us through www.grudgemirror.com or grudgã
-
From
MCMLXXIX@VERT/MDJ to
Garth Grudge on Sun Feb 23 23:20:08 2014
Re: trying to get started with a simple json-dbã By: Garth Grudge to All on Sat Feb 22 2014 13:55:58ãã > I've got a couple js files that create json-db's, such as synchronetris orã > uberblox, however, after browsing the code, I couldn't find any reference toã > the creation of the db. I've noticed if you add a DB service in theã > services.ini it does not actually create the database at that point afterã > checking the directories. Anyhow, if there's a point in the code or aããthe only time the database deals with files is when loading a backup from file,ãor storing an intermittent backup to file. the rest of the time, the data isãstored in an object. dont rely on the existence of files (that would, in yourãcase, be empty) because they dont exist until there's data to be saved. if youãmonitor your logs you should see where it creates the database instance.ãã---ã þ Synchronet þ The BRoKEN BuBBLE (bbs.thebrokenbubble.com)ã
-
From
Garth Grudge@VERT/GRUDGEDU to
MCMLXXIX on Mon Feb 24 00:01:56 2014
Re: trying to get started with a simple json-dbã By: MCMLXXIX to Garth Grudge on Sun Feb 23 2014 11:20 pmããcool. muchas thanks for the info, i'll keep a lookout for it in the log filesãonce i get some code constructed. it looks like i need to basically : ãã1. create a json service is json-service.iniã2. declare a jsonclient object to connect to that serviceã3. declare a json-db that uses that clientã4. learn how to use jsondb so that i can create some goodnessããawesomesauceãã---ã þ Synchronet þ \1yF\1mU\1cT\1wU\1rR\1gELand : \1w find us through www.grudgemirror.com or grudgã