0:14 AM
Dead_Thinker joined the channel
0:20 AM
mblain has quit
0:26 AM
d9k_ has quit
0:27 AM
Spanktar has quit
0:31 AM
Spanktar joined the channel
0:34 AM
dmsalta joined the channel
0:43 AM
c0le joined the channel
0:54 AM
stevepiercy
goodwill yes, agreed, don't know yet what that should be, but this discussion should go into the reopened issue
0:55 AM
0:56 AM
for a step-by-step approach that is
1:03 AM
dudepare
stevepiercy: thanks! will give this a run through as well. I'm interested in the testing bit.
1:06 AM
Dead_Thinker has quit
1:10 AM
kamalgill joined the channel
1:32 AM
rickmak_ joined the channel
1:34 AM
kamalgill has quit
1:38 AM
davisagli joined the channel
2:00 AM
Rizy joined the channel
2:04 AM
pdobrogost_home has quit
2:07 AM
pdobrogost_home joined the channel
2:29 AM
driti has quit
2:59 AM
rickmak joined the channel
3:01 AM
dmsalta has quit
3:06 AM
c0le has quit
3:11 AM
c0le joined the channel
3:11 AM
hvelarde has quit
3:22 AM
dima has quit
3:26 AM
hvelarde joined the channel
3:55 AM
dima joined the channel
4:15 AM
hvelarde has quit
4:29 AM
rickmak_ joined the channel
4:35 AM
uralbash joined the channel
4:49 AM
tokra100 joined the channel
4:54 AM
mastokley joined the channel
5:23 AM
rickmak joined the channel
5:28 AM
yvl has quit
5:30 AM
yvl joined the channel
5:40 AM
frispete joined the channel
5:44 AM
frispete_ has quit
5:53 AM
darkxploit joined the channel
6:01 AM
driti joined the channel
6:10 AM
agitator|hpeter joined the channel
6:19 AM
mastokley joined the channel
6:26 AM
atomekk joined the channel
6:29 AM
yleclanche joined the channel
6:34 AM
davisagli has quit
6:35 AM
waigani joined the channel
6:51 AM
Pumukel joined the channel
6:52 AM
davisagli joined the channel
6:54 AM
bochecha joined the channel
7:01 AM
tokra100
hey, i've got a column with datatype datetime and as values the current timestamp on creating this entry, e.g. func.now(). is there any chance for filtering like *.filter(and_(Column.timestamp >= yesterday, Column.timestamp < today)).all()? i've tried pythons datetime class, but this does not work :\
7:05 AM
mastokley joined the channel
7:08 AM
Charlie_X joined the channel
7:09 AM
disko joined the channel
7:13 AM
Aankhen`` has quit
7:15 AM
stevepiercy
7:15 AM
davisagli has quit
7:19 AM
mastokley has quit
7:19 AM
Aankhen`` joined the channel
7:19 AM
El_Rolando joined the channel
7:19 AM
datetime has yesterday()? ♪ all my troubles seemed so far away. now() it seems as if they're here to stay. ♪
7:21 AM
tokra100 got anything concrete to show? code example, traceback?
7:21 AM
sakal joined the channel
7:27 AM
tokra100
7:32 AM
sakal has quit
7:35 AM
is there any way to say something like: func.now().setDate('...')?
7:35 AM
Charlie_X
tokra100: now
7:35 AM
no
7:35 AM
tokra100
then how to filter for specific dates?
7:36 AM
stevepiercy
tokra100 you can use a range, but i think you need to use actual dates
7:36 AM
Charlie_X
timestamps usually aren't datetimes
7:37 AM
stevepiercy
7:37 AM
slav0nic joined the channel
7:38 AM
Charlie_X the column name is timestamp, but its type is datetime
7:38 AM
which is a really confusing convention
7:38 AM
Charlie_X
Well the filter should work
7:39 AM
Though the and_ isn't necessary
7:39 AM
Aankhen``
7:39 AM
Charlie_X
Simply chain the filters
7:40 AM
stevepiercy
the date format being used might not align with the datasource, but maybe something in the process converts it
7:40 AM
Charlie_X
SQLa can handle that.
7:40 AM
stevepiercy
tokra100 also, just to confirm, are you using SQLAlchemy and postgresql?
7:40 AM
tokra100
yes
7:41 AM
i'll have a look at the ArrowType :)
7:41 AM
stevepiercy
ok, so one thing i see here is that the date string could be ambiguous
7:41 AM
Charlie_X
nah
7:42 AM
stevepiercy
05.04.2016
7:42 AM
is that may 4, or apr 5?
7:42 AM
Charlie_X
no
7:42 AM
stevepiercy
if yer merkin, yer backward
7:42 AM
Charlie_X
But ISO is 2016-04-04
7:42 AM
tokra100
is april, 5th
7:43 AM
Charlie_X
Using datetimes is the safest way.
7:43 AM
Zart
may 4 only when / is used as a separator
7:43 AM
stevepiercy
i just don't know whether SQLA knows that
7:43 AM
Zart
otherwise clearly apr 5
7:43 AM
still better to use iso format
7:43 AM
Charlie_X
Yes. Dates are only a problem when Americans are in the room
7:44 AM
Or religious holidays: happy Easter Zart
7:44 AM
n2o joined the channel
7:45 AM
stevepiercy
♪ tomorrow. all my troubles seemed so far oh. then it seems to borrow ♪
7:45 AM
Charlie_X
Stop singing
7:45 AM
mr_jolly joined the channel
7:45 AM
Zart
took me 3 days to make mysql replication work 8\
7:46 AM
Charlie_X
Impressive
7:46 AM
Zart
and i'm not sure it wont break in next few minutes
7:46 AM
Charlie_X
That's part of the fun.
7:46 AM
Zart
shitty db, shitty docs, shitty support...
7:46 AM
Charlie_X
"but it's free!"
7:46 AM
Why can't you use pg?
7:47 AM
stevepiercy
7:47 AM
Charlie_X
And Oracle's support is better than MySQL's ever was.
7:47 AM
Zart
this is for php web app for helpdesk, that's in core of our business..
7:47 AM
stevepiercy
oracle owns mysql
7:48 AM
Charlie_X
i know that. And they're doing a reasonable job.
7:48 AM
MySQL is far less shitty (unpredictable) than it was.
7:48 AM
stevepiercy
turd polishing
7:48 AM
Zart
guides and docs on "how to enable crash-safe slave". why it isnt default?..
7:49 AM
Charlie_X
stevepiercy: sure
7:49 AM
stevepiercy
oracle should have bronzed mysql and put it up on the mantel
7:49 AM
jhauser joined the channel
7:49 AM
Charlie_X
They have paying customers and know how to milk them.
7:49 AM
stevepiercy
then take a wrecking ball to the house and set it on fire
7:49 AM
Charlie_X
The freetards moaned and left.
7:51 AM
stevepiercy
tokra100 so when you say it doesn't work, is it that you are finding no records?
7:51 AM
tokra100
i dont even know, how to filter for a specific time. like: i want all data from last week
7:52 AM
stevepiercy
in the paste, only records with the date of 19.04.2016 would be retrieved
7:52 AM
Charlie_X
tokra use intervals
7:52 AM
stevepiercy
yeah
7:52 AM
intervals are your friend
7:52 AM
or you can do date math and pass in that value
7:52 AM
but that gets hairy
7:52 AM
Zart
oh... there are people who do something like WHERE datetime_column LIKE '201604%'
7:53 AM
Charlie_X
lovely
7:53 AM
stevepiercy
it burns!
7:53 AM
Charlie_X
sounds very mysqlly
7:53 AM
tokra100
i've tried date math with datetime.timedelta, but thats weird
7:54 AM
Charlie_X
tokra100: you should be letting the db do the maths for you.
7:54 AM
tokra100
is there any docs/example for an interval-query ?
7:54 AM
stevepiercy
if you include a time component, then it gets really weird
7:54 AM
yay for timezones and daylight saving time
7:54 AM
like some days have 25 hours in them
7:55 AM
Charlie_X
7:55 AM
stevepiercy
stray ) in there
7:56 AM
MrTango joined the channel
7:56 AM
Charlie_X
yeah, it's from a bigger query
7:56 AM
Just shows interval
7:57 AM
Read the pg docs
7:57 AM
pldz joined the channel
7:58 AM
stevepiercy
8:01 AM
areski joined the channel