/* Database module */
/* Schema 
 *
 * usn			: String
 * subject		: String
 * lec_no		: String
 * note_time	: String
 * note_type	: String
 * content		: String
 * ext_links	: String
*/

var mongoose = require('mongoose')
mongoose.connect('mongodb://localhost/micronotes');
var Schema = mongoose.Schema;

var MicroNoteSchema = new Schema({
	usn			: String,
	subject		: String,
	lec_no		: String,
	note_time	: String,
	note_type	: String,
	content		: String,
	ext_links	: String
});

var MicroNote = mongoose.model('MicroNotes', MicroNoteSchema);

exports.create = function(entry, Callback) {
	var newnote = new MicroNote();
	newnote.usn = entry.usn;
	newnote.subject = entry.subject;
	newnote.lec_no = entry.lec_no;
	newnote.note_time = entry.note_time;
	newnote.note_type = entry.note_type;
	newnote.content = entry.content;
	newnote.ext_links = entry.ext_links;

	newnote.save(Callback);
};

exports.retrieve = function(options, Callback) {
	if (typeof options === 'undefined') {
		options = {};
	};
	MicroNote.find(options, function(err, docs) {
		Callback(err, docs);
	});
};


@@ -640,16 +640,30 @@
 ntry.usn
+.toUpperCase()
 ;%0A%09newno
@@ -688,16 +688,30 @@
 .subject
+.toUpperCase()
 ;%0A%09newno
@@ -734,16 +734,30 @@
 y.lec_no
+.toUpperCase()
 ;%0A%09newno
@@ -786,16 +786,30 @@
 ote_time
+.toUpperCase()
 ;%0A%09newno
@@ -838,16 +838,30 @@
 ote_type
+.toUpperCase()
 ;%0A%09newno
@@ -924,16 +924,30 @@
 xt_links
+.toUpperCase()
 ;%0A%0A%09newn

Convert input data to uppercase