WhyTF am I putting my Node in The Intern?
-
Meanwhile, MSSQL is case sensitive.
If you use a case-sensitive collation, it's case-sensitive. If you don't, it's done. Also: duh.
-
For MSSQL at least, it seems to be linked to the DB's default collation whether object names are case sensitive or not; well, it used to be anyway.
Wait, OBJECT names? I thought you meant strings. Object names are always case-insensitive.
Things may have changed.
Riiiiight.
-
If you use a case-sensitive collation, it's case-sensitive. If you don't, it's done. Also: duh.
*ahem*
@RaceProUK said:For MSSQL at least, it seems to be linked to the DB's default collation whether object names are case sensitive or not; well, it used to be anyway. Things may have changed.
-
Eh, I'm a web dev, not a DBA ;)
-
Here's the test, redesigned to use promises:
insert: function() { dao.createDB("unitTest.db"); return dao.getItems().then(function(items) { assert.isArray(items, "Items was not an array"); assert.isTrue(items.length < 1,"dao returned items before inserting."); return dao.addItem("Test", "test", 0); }).then(function() { return dao.getItems(); }).then(function(items) { assert.isArray(items, "Items wasn't an array"); assert.isTrue(items.length < 1, "dao did not return the inserted item"); }); }
-
that of course assumes that the DAO is promise based, it may not be.
-
It's not, but presumably all I have to do is make a promise object when the method is called, return it after sending off the async call to the sqlite db, and then resolve it in the callback, right?
-
sounds about right. ;-)
-
Yeah, the way it would be done in Discourse, if it had access to the Chrome extension synced storage api (just a convienient callback-based API I could look up), is this:
const Something = Em.Something.extend({ getItems() { return new Em.RSVP.Promise(function(resolve, reject) { chrome.storage.sync.get('value', function(items) { resolve(items); }); }); } }); export default Something;
The whole point of promises is the chaining without indentation.