Created
March 1, 2013 22:27
-
-
Save davidascher/5068431 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the meteor framework expects calls to be sync: | |
Meteor.methods({ | |
search: function (term) { | |
return searchresults; | |
} | |
}); | |
// the db call that performs the search is async: | |
db.run("SELECT key FROM paragraphs WHERE data MATCH '" + term + "'", function(err, rows) { | |
searchresults = rows; | |
}); | |
Author
davidascher
commented
Mar 1, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment