Skip to content

Commit

Permalink
update: add current_schema.json & nest AND in db_schema.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
GoranBrkuljan committed Dec 21, 2024
1 parent c627d47 commit 0d71325
Show file tree
Hide file tree
Showing 2 changed files with 421 additions and 12 deletions.
24 changes: 12 additions & 12 deletions charybdis-parser/src/schema/db_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ impl DbSchema {
SELECT
column_name, type
FROM system_schema.columns
WHERE keyspace_name = ?
AND table_name = ?
WHERE keyspace_name = ?
AND table_name = ?
ALLOW FILTERING"#;

let result = session
Expand Down Expand Up @@ -143,8 +143,8 @@ impl DbSchema {
SELECT column_name
FROM system_schema.columns
WHERE keyspace_name = ?
AND table_name = ?
AND kind = 'partition_key'
AND table_name = ?
AND kind = 'partition_key'
ALLOW FILTERING"#;

let result = session
Expand Down Expand Up @@ -174,8 +174,8 @@ impl DbSchema {
SELECT column_name
FROM system_schema.columns
WHERE keyspace_name = ?
AND table_name = ?
AND kind = 'clustering'
AND table_name = ?
AND kind = 'clustering'
ALLOW FILTERING"#;

let result = session
Expand Down Expand Up @@ -205,7 +205,7 @@ impl DbSchema {
SELECT index_name, options
FROM system_schema.indexes
WHERE keyspace_name = ?
AND table_name = ?
AND table_name = ?
ALLOW FILTERING"#;

let result = session
Expand Down Expand Up @@ -294,7 +294,7 @@ impl DbSchema {
SELECT column_name, type
FROM system_schema.columns
WHERE keyspace_name = ?
AND table_name = ?
AND table_name = ?
ALLOW FILTERING"#;

let result = session
Expand Down Expand Up @@ -322,8 +322,8 @@ impl DbSchema {
SELECT column_name
FROM system_schema.columns
WHERE keyspace_name = ?
AND table_name = ?
AND kind = 'partition_key'
AND table_name = ?
AND kind = 'partition_key'
ALLOW FILTERING"#;

let result = session
Expand Down Expand Up @@ -352,8 +352,8 @@ impl DbSchema {
SELECT column_name
FROM system_schema.columns
WHERE keyspace_name = ?
AND table_name = ?
AND kind = 'clustering'
AND table_name = ?
AND kind = 'clustering'
ALLOW FILTERING"#;

let result = session
Expand Down
Loading

0 comments on commit 0d71325

Please sign in to comment.