Skip to content

Commit

Permalink
Google Java Format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Sep 3, 2023
1 parent 7b6daec commit 7f48d4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public List<String> batchInsertMetadata(String metadataTableName, List<String> m
UUID metadataId =
jdbcTemplate.queryForObject(
String.format(
"INSERT INTO %s (metadata_id, metadata) VALUES ('%s', '%s') RETURNING metadata_id;",
"INSERT INTO %s (metadata_id, metadata) VALUES ('%s', '%s') RETURNING"
+ " metadata_id;",
metadataTableName, UuidCreator.getTimeOrderedEpoch(), metadataList.get(i)),
UUID.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public List<String> batchUpsertEmbeddings(
UUID id =
jdbcTemplate.queryForObject(
String.format(
"INSERT INTO %s (id, raw_text, embedding, timestamp, namespace, filename) VALUES"
+ " ('%s', '%s', '%s', '%s', '%s', '%s') ON CONFLICT (raw_text) DO UPDATE"
+ " SET embedding = EXCLUDED.embedding RETURNING id;",
"INSERT INTO %s (id, raw_text, embedding, timestamp, namespace, filename)"
+ " VALUES ('%s', '%s', '%s', '%s', '%s', '%s') ON CONFLICT (raw_text) DO"
+ " UPDATE SET embedding = EXCLUDED.embedding RETURNING id;",
tableName,
UuidCreator.getTimeOrderedEpoch(),
wordEmbeddings.getId(),
Expand Down

0 comments on commit 7f48d4a

Please sign in to comment.