Skip to content

Commit

Permalink
Updated table name
Browse files Browse the repository at this point in the history
  • Loading branch information
mans4singh committed Nov 23, 2016
1 parent 744511a commit 1e6a35a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
create table user_assignment_by_userid (
experiment_id uuid,
user_id varchar,
context varchar,
bucket_label varchar,
created timestamp,
PRIMARY KEY ((user_id), context, experiment_id)
);
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface UserAssignmentIndexAccessor {
* @param bucketLabel
* @return resultSet
*/
@Query("insert into user_assignment_by_userId_context_experimentId (experiment_id, user_id, context, created, bucket_label)" +
@Query("insert into user_assignment_by_userid (experiment_id, user_id, context, created, bucket_label)" +
" values (?, ?, ?, ?, ?)")
ResultSet insertBy(UUID uuid, String userId, String context, Date created, String bucketLabel);

Expand All @@ -51,7 +51,7 @@ public interface UserAssignmentIndexAccessor {
* @param created
* @return resultSet
*/
@Query("insert into user_assignment_by_userId_context_experimentId (experiment_id, user_id, context, created)" +
@Query("insert into user_assignment_by_userid (experiment_id, user_id, context, created)" +
" values (?, ?, ?, ?)")
ResultSet insertBy(UUID uuid, String userId, String context, Date created);

Expand All @@ -62,7 +62,7 @@ public interface UserAssignmentIndexAccessor {
* @param context
* @return result
*/
@Query("select * from user_assignment_by_userId_context_experimentId where experiment_id = ? and user_id = ? and context = ?")
@Query("select * from user_assignment_by_userid where experiment_id = ? and user_id = ? and context = ?")
Result<UserAssignmentByUserIdContextExperimentId> selectBy(UUID experimentId, String userId, String context);


Expand All @@ -73,7 +73,7 @@ public interface UserAssignmentIndexAccessor {
* @param experimentId
* @return resultSet
*/
@Query("delete from user_assignment_by_userId_context_experimentId where user_id = ? and context = ? and experiment_id = ?")
@Query("delete from user_assignment_by_userid where user_id = ? and context = ? and experiment_id = ?")
ResultSet deleteBy(String userId, String context, UUID experimentId);

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


//TODO: this seems redundent since UserAssignment contains the same data with same primary key but different order, do we make queries that are order specific?
@Table(name="user_assignment_by_userId_context_experimentId")
@Table(name="user_assignment_by_userid")
@Data
@Builder(toBuilder = true)
@NoArgsConstructor
Expand Down

0 comments on commit 1e6a35a

Please sign in to comment.