Created
December 6, 2013 02:39
-
-
Save acidsound/7817721 to your computer and use it in GitHub Desktop.
table 검색용.
mongoimport -d frs -c alltables --type csv --file ALL_TABLES-표\ 1.csv --headerline 로 밀어넣고 마구 검색
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
Alltables = new Meteor.Collection('alltables'); | |
if (Meteor.isClient) { | |
Meteor.subscribe('Alltables'); | |
Template.tables.tables=function() { | |
return Session.get("wd") && Alltables.find({ | |
$or:[ | |
{TABLE_PHYSICAL:RegExp(Session.get('wd'))}, | |
{TABLE_LOGICAL:RegExp(Session.get('wd'))}, | |
{COLUMN_PHYSICAL:RegExp(Session.get('wd'))}, | |
{COLUMN_LOGICAL:RegExp(Session.get('wd'))} | |
] | |
}, { | |
$sort:{TABLE_PHYSICAL:1, COLUMN_ID:1} | |
}); | |
} | |
Template.tables.events({ | |
'submit' : function () { | |
Session.set('wd', $('.wd').val()); | |
return false; | |
} | |
}); | |
} | |
if (Meteor.isServer) { | |
Meteor.startup(function () { | |
// code to run on server at startup | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment