Find Jobs
Hire Freelancers

Create query to be used in mongoengine to query results by date in dictfield inside listfield

$10-30 USD

Fullført
Lagt ut over 5 år siden

$10-30 USD

Betalt ved levering
Hi! This project is about a query to get results by date using mongoengine over mongodb to filter results by month, year and month and age So, I have a model in Mongoengine class Contact([login to view URL]): name = [login to view URL](max_length=255, verbose_name=_(u'Name')) email = [login to view URL](verbose_name=_(u'E-mail')) customs = [login to view URL]([login to view URL]()) In field customs I will a list of dictionaries like that: [login to view URL] = [{'k':'phone','v':'444-444-444'},{'birth_date':[login to view URL](1980,6,1)] I will have a lot of register with differents birth dates, but one date for each person. So I would like to do: 1 - Create a query that I can get all person that has birth day in a specific month 2 - Create a query that I can get any person that borns in a single year 3 - Create a query that I can get all persons that is under 18 year old What I will not accepet, query in mongodb and pymongo. I want a query using mongoengine running over python/Django, compatible with python 2.7 and Django 1.4 Let's game begins!
Prosjekt-ID: 18033515

Om prosjektet

3 forslag
Eksternt prosjekt
Aktiv 6 år siden

Ønsker du å tjene penger?

Fordeler med budgivning på Freelancer

Angi budsjettet og tidsrammen
Få betalt for arbeidet ditt
Skisser forslaget ditt
Det er gratis å registrere seg og by på jobber
Tildelt til:
Brukeravatar
Hi. After some research I find that: a) In your example "birth_date" is a [login to view URL] object, but this should be a [login to view URL] object, since MongoDB (BSON) don't have a type for date without time. Trying to store a date object in MongoDB results in an error saying date object cannot be encoded. b) Queries like [login to view URL](customs__birth_date__gte=[login to view URL](2010, 1, 1)) works (honestly I have no idea why this would work but sure it is as I tested). So: [login to view URL]( customs__birth_date__gte=[login to view URL](2010, 1, 1), customs__birth_date__lt=[login to view URL](2011, 1, 1), ) gives you all people with birth date greater than or equal to 20100101 and less than 20110101, which is exactly all people with birth year 2010. The same technique can be used to find out all people whose age is under 18: just filter birth date greater than [current date - 18 years]. So your requests (2) and (3) are fulfilled. c) Your request (1) is harder than it seems. This cannot be done by normal queries, but can be done using aggregations, since aggregation mechanism provides "$month" operator to extract month from a date. I haven't figure out how to do it yet, but it is possible. Please contact me if you want me to do more research and finish this for you. Thanks.
$30 USD om 1 dag
5,0 (1 omtale)
1,0
1,0
3 frilansere byr i gjennomsnitt $55 USD for denne jobben
Brukeravatar
Hi, It's a great pleasure to see a job post related Django and MongoDB. Which is really rear Though most of the developer uses only relation database like MySql or PostgreSQL i am one of those wo use both relation and noSql. Looking at your query based requirements I hope i can help you here with my experience, Knock me to discusses more Regards
$111 USD om 3 dager
4,9 (17 omtaler)
4,3
4,3
Brukeravatar
Hi, I'd like to help you out with your project because I could say I understand what you're looking for with this script. if you're interested in my bid, send me a message and we could sort terms. best regards!
$25 USD om 2 dager
4,8 (5 omtaler)
2,3
2,3

Om klienten

BRAZILs flagg
Rio de Janeiro, Brazil
0,0
0
Betalingsmetode bekreftet
Medlem siden sep. 21, 2014

Klientbekreftelse

Lignende jobber

NodeJS Integrate remote service (Prj X1)
$250-750 USD
Crawl, extract, build and publish all Docker Hub, Quay.io, GitHub, BitBucket, GitLab, Snapcraft, Flatpak, AppImages, DC++, eMule, BitTorrent and SoulSeek as deb packages (APT repository), from ISO, container images, and source code files.
€8-30 EUR
Full Time Senior Python Developer
$800-1200 USD
Social Media Software Development
₹400-750 INR / hour
Configure Nginx to handle HTTP&HTTPS requests behind GCP Load-balancer
$10-30 USD
Small Scale Django Google App Engine
€18-36 EUR / hour
It will crawl and extract all itags from all images from Docker Hub, Quay.io, AWS ECR Public Gallery, Snapcraft, Flatpak, AppImages, Bundles, BitTorrent, EDonkey2000, SoulSeek and DC++, and it will build and publish deb packages (as APT repository).
€8-30 EUR
Python & Django Website Redesign
₹1500-12500 INR
Dynamic API Wizard - JavaScript node js Expert
$250-750 USD
Require a backend developer for PHP to Python Code Conversion
₹1500-2500 INR
Python/Flask Developer Needed
€30-250 EUR
Python Game Developer Needed
$30-250 AUD
Versatile Full-Stack Developer Needed
$15-25 USD / hour
Mobile Script Creation for Task Automation
$250-750 USD
Full Stack Developer Needed
₹750-1250 INR / hour
Fashion Clothing Website with Accounting System - 07/05/2024 14:12 EDT
₹12500-40000 INR
EDA Flow Interface Development
$15-25 USD / hour
Intrusion Detection Model
$30-250 USD
I need EXPERt , javascrip, java, PYTHON ,c#
$30-250 USD
Node.js Site Database Remapping
₹600-1500 INR
Takk! Vi har sendt deg en lenke for at du skal kunne kreve din gratis kreditt.
Noe gikk galt. Vær så snill, prøv på nytt.
Registrerte brukere Publiserte jobber
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Forhåndsvisning innlasting
Tillatelse gitt for geolokalisering.
Påloggingsøkten din er utløpt og du har blitt logget ut. Logg på igjen.