Created
December 5, 2010 03:03
-
-
Save gmarik/728720 to your computer and use it in GitHub Desktop.
this doesn't work. Why? because value is a string in a key-value store.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# looks like Content-type is set to application/octet-stream for nil values | |
# | |
User-Agent: Mozilla-5.0 (ANDROID; generic; 2.2) | |
I/APP ( 3006): Content-Length: 3531 | |
I/APP ( 3006): Content-Type: multipart/form-data; boundary=----------------------------44729c969b01 | |
I/APP ( 3006): | |
I/APP ( 3006): I 12/04/2010 20:55:34:609 0066c790 Net| => Send data (818 bytes): ------------------------------44729c969b01 | |
I/APP ( 3006): Content-Disposition: form-data; name="bill[amount]" | |
I/APP ( 3006): Content-Type: application/octet-stream | |
I/APP ( 3006): Content-Length: 0 | |
I/APP ( 3006): | |
I/APP ( 3006): | |
I/APP ( 3006): ------------------------------44729c969b01 | |
I/APP ( 3006): Content-Disposition: form-data; name="bill[date]" | |
I/APP ( 3006): Content-Type: application/octet-stream | |
I/APP ( 3006): Content-Length: 0 | |
I/APP ( 3006): | |
I/APP ( 3006): | |
I/APP ( 3006): ------------------------------44729c969b01 | |
I/APP ( 3006): Content-Disposition: form-data; name="bill[tax]" | |
I/APP ( 3006): Content-Type: application/octet-stream | |
I/APP ( 3006): Content-Length: 0 | |
I/APP ( 3006): | |
I/APP ( 3006): | |
I/APP ( 3006): ------------------------------44729c969b01 | |
I/APP ( 3006): Content-Disposition: form-data; name="bill[memo]" | |
I/APP ( 3006): Content-Type: application/octet-stream | |
I/APP ( 3006): Content-Length: 0 | |
I/APP ( 3006): | |
I/APP ( 3006): | |
I/APP ( 3006): ------------------------------44729c969b01 | |
I/APP ( 3006): Content-Disposition: form-data; name="bill[attachment]"; filename="rhodata" | |
I/APP ( 3006): Content-Type: application/octet-stream | |
I/APP ( 3006): Content-Length: 2048 | |
I/APP ( 3006): | |
I/APP ( 3006): T 12/04/2010 20:55:34:613 0066c790 Net| we still have active transfers but no data ready at this moment; waiting... | |
I/APP ( 3006): I 12/04/2010 20:55:34:620 0066c790 Net| => Send data (665 bytes): | |
I/APP ( 3006): ------------------------------44729c969b01 | |
I/APP ( 3006): Content-Disposition: form-data; name="bill[expenses][][amount]" | |
I/APP ( 3006): Content-Type: application/octet-stream | |
I/APP ( 3006): Content-Length: 0 | |
I/APP ( 3006): | |
I/APP ( 3006): | |
I/APP ( 3006): ------------------------------44729c969b01 | |
I/APP ( 3006): Content-Disposition: form-data; name="bill[expenses][][account_id]" | |
I/APP ( 3006): Content-Length: 1 | |
I/APP ( 3006): | |
I/APP ( 3006): 1 | |
I/APP ( 3006): ------------------------------44729c969b01 | |
I/APP ( 3006): Content-Disposition: form-data; name="bill[expenses][][customer_id]" | |
I/APP ( 3006): Content-Length: 1 | |
I/APP ( 3006): | |
I/APP ( 3006): 1 | |
I/APP ( 3006): ------------------------------44729c969b01 | |
I/APP ( 3006): Content-Disposition: form-data; name="bill[expenses][][memo]" | |
I/APP ( 3006): Content-Type: application/octet-stream | |
I/APP ( 3006): Content-Length: 0 | |
I/APP ( 3006): | |
I/APP ( 3006): | |
I/APP ( 3006): ------------------------------44729c969b01-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM ( | |
SELECT object, | |
MAX(CASE WHEN attrib = 'account_id' THEN value ELSE NULL END) AS 'account_id', | |
MAX(CASE WHEN attrib = 'amount' THEN value ELSE NULL END) AS 'amount', | |
MAX(CASE WHEN attrib = 'bill_id' THEN value ELSE NULL END) AS 'bill_id', | |
MAX(CASE WHEN attrib = 'customer_id' THEN value ELSE NULL END) AS 'customer_id', | |
MAX(CASE WHEN attrib = 'memo' THEN value ELSE NULL END) AS 'memo' FROM object_values ov | |
where "source_id" = '2' | |
group by object | |
) WHERE bill_id = 60719768582294 | |
-- should be WHERE bill_id = '60719768582294' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment