Saturday, 2012-05-12

*** tpb has joined #melange00:00
*** asmeurer has quit IRC00:06
*** asmeurer_ has joined #melange00:47
*** asmeurer_ has quit IRC01:09
*** BlankVerse has joined #melange01:25
*** asmeurer__ has joined #melange01:31
*** asmeurer__ has quit IRC01:38
*** BlankVerse has quit IRC01:55
*** BlankVerse has joined #melange02:49
*** madrazr has joined #melange03:08
*** ChanServ sets mode: +o madrazr03:08
*** madrazr has quit IRC07:52
*** robbyoconnor has joined #melange08:13
*** r0bby_ has joined #melange08:14
*** robbyoconnor has quit IRC08:18
*** r0bby_ is now known as robbyoconnor08:30
*** robbyoconnor has quit IRC08:32
*** robbyoconnor has joined #melange08:33
*** dhaun has joined #melange11:10
*** asmeurer_ has joined #melange12:56
*** Arc has quit IRC15:36
*** Arc has joined #melange15:36
*** haseeb has joined #melange17:09
*** RedAdmiral has joined #melange17:53
*** RedAdmiral has quit IRC18:40
*** asmeurer_ has quit IRC18:55
*** madrazr has joined #melange19:01
*** ChanServ sets mode: +o madrazr19:01
madrazrbetelgeuse_: Hi19:01
*** sandroandrade has joined #melange19:02
*** sandroandrade has quit IRC19:03
*** RedAdmiral has joined #melange19:26
*** sandroandrade has joined #melange19:29
betelgeuse_hey , madrazr20:12
madrazrbetelgeuse_: do you have time now?20:12
betelgeuse_yes20:12
madrazrbetelgeuse_: so, yeah, there are two approaches I can think about for now20:15
madrazrbetelgeuse_: depends on how adventurous you want to be20:15
madrazrbetelgeuse_: and also your time20:16
betelgeuse_I have time and yeah i guess i will try to implement both the ways .20:16
madrazrbetelgeuse_: I would first get done the easy way to first show something works20:16
betelgeuse_starting with the easy way .20:16
madrazrand then take the more adventurous path if you are still interested20:16
madrazrbetelgeuse_: cool!20:16
madrazrbetelgeuse_: the easiest way to do is to put a drop box20:16
madrazrbetelgeuse_: which has "Email ID", "Link ID", "Name" etc as the options20:17
madrazrbetelgeuse_: and a text box for the search input20:17
madrazrbetelgeuse_: then while querying the datastore, use that property as the filter20:17
betelgeuse_ok , will do20:17
madrazrbetelgeuse_: Ok20:17
madrazrbetelgeuse_: how long do you think it is going to take?20:17
betelgeuse_i have to see , depends , because i am not that good with the models and database stuff .20:18
betelgeuse_how long should it take normally ?20:18
madrazrbetelgeuse_: about a day's work considering what you said20:19
madrazrbetelgeuse_: a day == 8 hours20:19
madrazrbetelgeuse_: don't spend too much time reading docs etc, at least for this20:20
betelgeuse_ok , i will try it and will let you know tomorrow  ?20:20
betelgeuse_20:20
madrazrbetelgeuse_: there is a lot of code in Melange which does query filtering20:20
madrazrbetelgeuse_: sure20:20
betelgeuse_sure .20:20
betelgeuse_what does query filtering mean ?20:21
madrazrbetelgeuse_: keep me posted, preferably via email. I may not be physically here all the time even if I am logged in20:21
betelgeuse_sure .20:21
madrazrbetelgeuse_: let us say you have a model called Profile20:21
madrazrbetelgeuse_: now you want to fetch all the entities of the model profile20:21
madrazrbetelgeuse_: for this you will have to query the datastore right?20:22
betelgeuse_yes .20:22
madrazrbetelgeuse_: but now let us say, you want only those profile entities that has the first name "John"20:22
betelgeuse_ok ,20:23
*** robbyoconnor has quit IRC20:23
madrazrbetelgeuse_: so in Appengine jargon, this thing of getting only those entities that match the required property value is called filtering20:23
betelgeuse_ok , cool .20:24
madrazrbetelgeuse_: just as an example20:24
madrazrassume your model class is called XYZ20:24
madrazrand it has a property called "name"20:24
madrazrbetelgeuse_: if you want to fetch only those entities with name John, you would do20:25
betelgeuse_ok,20:25
madrazrq = XYZ.all()20:25
madrazrgives you the base query20:25
madrazrq.filter('name', 'John')20:25
madrazrgives you the filtered query20:25
madrazrnow you can fetch all the entities that match your query by doing20:26
madrazrentities = q.fetch(1000)20:26
madrazrNOTE, 1000 is the maximum number of entities you can fetch per query20:26
madrazrbetelgeuse_: makes sense?20:26
betelgeuse_will try , thanks , yes .20:26
madrazrbetelgeuse_: Ok20:27
madrazrNP20:27
madrazrbetelgeuse_: brb20:27
betelgeuse_ok .20:37
*** RedAdmiral has quit IRC21:09
*** dhaun has quit IRC23:21
*** sandroandrade has quit IRC23:21

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!