-1

hi I'm a fresh newbie to mongodb

Q1 using

query=new BasicDBObject();

query.put("i", new BasicDBObject("$gt",13));

and

query=new QueryBuilder().put("i").Greaterthan(13).get()

is there any difference inside of the system?

Q2 I've created a class

class findkv extends BasicDBObject {    
    //is gt gte lt lte  
    public findkv (String fieldname, String op,Object tvalue)
    {
        if (op == "")
            this.put(fieldname, tvalue);
        else 
            this.put(fieldname, new BasicDBObject(op,tvalue));
    }
}

shall I use it or shall I just use original function?

Q3 I've used mongo shell for a few weeks, and was customed to it, and find writing in mongo shell faster and shorter, which side has more advantage, writing in mongo or in java?

I shall dump them from mongo to mysql

Q4

I've an if (statement==true) return else dowhat; seems can't be compiled I know I can write if (statement!=true) dowhat else return, but can I still write in first style?

q5 my eclipse is Eclipse Java EE IDE for Web Developers.

Version: Juno Release Build id: 20120614-1722 I'd like to install Perl which I haven't learned yet I choose Install Update http://e-p-i-c.sf.net/updates/testing but it doesn't work, any method to install perl to eclipse manually?

RobEarl
  • 7,862
  • 6
  • 35
  • 50
Kitanski
  • 49
  • 3
  • 1
    Can I suggest you split this into 5 separate questions? You have a greater chance of getting at least some of them answered that way. – Trisha Jul 01 '13 at 13:45

1 Answers1

0

About your Q4-

Yes you can do that by any of these 2 ways.

if (statement==true) 
   return ;
else 
   dowhat ; 

Or

if (statement!=true)
   dowhat ;
else 
   return ;
Gaurav Manral
  • 600
  • 4
  • 7
  • 24