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
// plugin to be used for validating widgets for forms or anything with defined rules | |
/* | |
//////////////////////////////////////////////////////////////////////////////////////// | |
How to use ? | |
1) Add class = "validator" to element which has to be validated. | |
2) Add comma separated validation constraints in attribute called validator in that element like : validator="required,url" | |
(validators are defined in function called "Check_Validation" you can add more validators here .) | |
Example = <input name="url" value="http://google.com" class="validator" , validator="required,url"> |
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
We tried 1 million records and results were like . | |
riak took 20 minutes | |
mongodb took 2 minutes | |
GDBM took 20 seconds | |
Level DB took 12 seconds . |
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
/* | |
Insert and retrieve data from mongodb with golang . | |
*/ | |
package main | |
import ( | |
"fmt" | |
"labix.org/v2/mgo" | |
// "labix.org/v2/mgo/bson" |
NewerOlder