Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: feat UUID #1796

Merged
merged 5 commits into from
Sep 20, 2023
Merged

sql: feat UUID #1796

merged 5 commits into from
Sep 20, 2023

Conversation

jeroiraz
Copy link
Contributor

@jeroiraz jeroiraz commented Sep 15, 2023

solves #1695

alter table table1 add column u uuid
select * from table1
+-------------+----------------+------------+
| (TABLE1 ID) | (TABLE1 TITLE) | (TABLE1 U) |
+-------------+----------------+------------+
|           1 | "t1"           | NULL       |
|           2 | "t2"           | NULL       |
+-------------+----------------+------------+

update table1 set u = random_uuid()
select * from table1
+-------------+----------------+----------------------------------------+
| (TABLE1 ID) | (TABLE1 TITLE) |               (TABLE1 U)               |
+-------------+----------------+----------------------------------------+
|           1 | "t1"           | "848cb247-579c-4fd8-87aa-b59cc5854913" |
|           2 | "t2"           | "a85056a7-4a1f-49d3-ab39-aeeec78fd503" |
+-------------+----------------+----------------------------------------+

alter table table1 add column ubin blob[16]
update table1 set ubin = u::blob
select u, ubin from table1

+----------------------------------------+----------------------------------+
|               (TABLE1 U)               |          (TABLE1 UBIN)           |
+----------------------------------------+----------------------------------+
| "848cb247-579c-4fd8-87aa-b59cc5854913" | 848cb247579c4fd887aab59cc5854913 |
| "a85056a7-4a1f-49d3-ab39-aeeec78fd503" | a85056a74a1f49d3ab39aeeec78fd503 |
+----------------------------------------+----------------------------------+

@jeroiraz jeroiraz changed the base branch from master to chore_sql_range September 15, 2023 22:32
@coveralls
Copy link
Collaborator

coveralls commented Sep 15, 2023

Coverage Status

coverage: 89.369% (-0.1%) from 89.487% when pulling cf197b9 on feat_sql_uuid into 78bef35 on chore_sql_range.

Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
@jeroiraz jeroiraz changed the base branch from chore_sql_range to feat_store_multi_index September 20, 2023 14:54
@jeroiraz jeroiraz merged commit 4fd431f into feat_store_multi_index Sep 20, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 23 Code Smells

83.1% 83.1% Coverage
2.4% 2.4% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants