Exemplo n.º 1
0
 def insert(companyObj):
     companyObj['created_at'] = datetime.datetime.utcnow()
     if DB.count("company", {"name": companyObj['name']}) <= 0:
         DB.insert(collection='company', data=companyObj)
Exemplo n.º 2
0
 def count_query(query):
     return DB.count("users", query)
Exemplo n.º 3
0
 def fetch_open_position_count(companyName):
     return DB.count("jobPostings", {"company": companyName})
Exemplo n.º 4
0
    def insert(userObj):

        userObj['created_at'] = datetime.datetime.utcnow()
        if DB.count("users", {"email": userObj['email']}) <= 0:
            DB.insert(collection='users', data=userObj)
Exemplo n.º 5
0
 def insert(postingObj):
     postingObj['created_at'] = datetime.datetime.utcnow()
     if DB.count("jobPostings", {"jobId": postingObj['jobId']}) <= 0:
         DB.insert(collection='jobPostings', data=postingObj)