summaryrefslogtreecommitdiff
path: root/src/database/QueryUtils.java
AgeCommit message (Collapse)AuthorFilesLines
2014-05-10Fix timestamp typePeter Wu1-5/+8
Without this cast, setTimestamp would complain that a timestamp is expected, but a text type is given.
2014-05-10Convert String to DateTime (for created_at)Peter Wu1-2/+2
Extra efforts are done to keep the timezone information.
2014-05-10More query fixes (incorrect field names, table alias)Peter Wu1-4/+3
2014-05-10Split url to tweetUrl and userUrl, misc fixesPeter Wu1-21/+5
* Insert User URLs. * Fix hash insertion query (copy/paste error...). * Split url to tweetUrl and userUrl as there is no "url" table anymore. * Do not execute queries directly via getStmt(), but execute them via NamedPreparedStatement such that faulty queries can be printed. * Fix buildQuery for more than two primary keys. * Drop comments from prepared statements members in DataFiller, there is nothing that you cannot learn from the variable name. Besides there was a copy/paste error for mentions. * Change order of insertion to ensure consistency. * Inline setting parameters for queries, it is now more transparant.
2014-05-10Coordinates is an object with an arrayPeter Wu1-1/+7
Ensure that the array is of a fixed length, add tests to check for that.
2014-05-09Entities can be missing, user.place is not a stringPeter Wu1-1/+5
* User: place is not a string but a Place object. * User: entities is nullable. * Tweet: in_reply_to_user_id, coordinates is nullable. * ValidatingJsonDeserializer: Treat null values as missing fields. * ValidatingJsonDeserializerTest: Test for null values.
2014-05-09Use upsert queries, convert to named parameter statementsPeter Wu1-82/+101
Get rid of ispostedby, move it to tweet table ("userid")
2014-05-09Get rid of useless methodPeter Wu1-49/+37
2014-05-08Replace JSON by GSON, adding extra validationsPeter Wu1-58/+59
Also change reader method, tweets are not received via an observed but by submitting from the caller. Added TODO WTF here and there, formatted with Alt + Shift + F.
2014-05-07data querries into databaseS1297781-13/+103
2014-05-07Removed the extranous DBQuery and simpel propertyMaurice Laveaux1-14/+22
* InputReader reads from Scanner.
2014-05-07Added classes to refactor the database code.Maurice Laveaux1-0/+40
* DBConnection creates a persistent conn. * DBQuery resolves and executes queries. * QueryUtils creates sql query text.