Skip to content
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b12cfc0
refactor: analyse
psteinroe Dec 14, 2025
dc098c0
fix: dont use dyn
psteinroe Dec 14, 2025
6fae041
fix: correct AnalyserRules reference in codegen
psteinroe Dec 15, 2025
4e9757f
fix: update test imports to use LinterOptions and LinterDiagnostic
psteinroe Dec 15, 2025
4f16e91
style: apply rustfmt to test files
psteinroe Dec 15, 2025
4798b24
chore: integrate splinter into codegen
psteinroe Dec 14, 2025
821dd3a
fix: update bun.lock and remove unused mut
psteinroe Dec 15, 2025
0379759
chore: rebase onto refactor/rules with test import fixes
psteinroe Dec 15, 2025
cc43d1f
fix: use relative paths in splinter registry codegen
psteinroe Dec 15, 2025
85b1802
fix: remove unused RuleMeta import and apply clippy fixes
psteinroe Dec 15, 2025
a197a12
fix: apply clippy format! macro fix in convert.rs
psteinroe Dec 15, 2025
5f46e53
fix: panic on unknown splinter rule instead of fallback
psteinroe Dec 15, 2025
df44cfd
fix: apply formatting
psteinroe Dec 15, 2025
8c982d8
chore: integrate splinter runtime with analyse
psteinroe Dec 15, 2025
13afe90
fix: resolve configuration.rs from parent branch
psteinroe Dec 15, 2025
e2950b5
fix: strip outer parentheses from SQL queries before UNION ALL
psteinroe Dec 15, 2025
7a2d56e
fix: wrap queries in SELECT * FROM to handle CTEs in UNION ALL
psteinroe Dec 15, 2025
947426b
fix: add alias to subqueries in FROM clause
psteinroe Dec 15, 2025
404bab9
fix: simplify SQL query combination in run_splinter
psteinroe Dec 15, 2025
a8c551c
fix: ensure all SQL queries are wrapped in parentheses for UNION ALL
psteinroe Dec 15, 2025
7dd9257
fix: use column names with ! suffix in FromRow implementation
psteinroe Dec 15, 2025
3f06f59
fix: add ORDER BY to combined SQL for deterministic result ordering
psteinroe Dec 15, 2025
d00534e
test: update snapshots with corrected formatting
psteinroe Dec 15, 2025
0b27360
chore: apply clippy formatting suggestions
psteinroe Dec 15, 2025
e86fa47
chore: integrate splinter into docs codegen
psteinroe Dec 15, 2025
22376a6
fix: apply clippy formatting to splinter_docs
psteinroe Dec 15, 2025
dae4622
refactor: expose structured metadata through splinter registry
psteinroe Dec 15, 2025
229dc8f
refactor: embed splinter metadata directly in SplinterRule trait
psteinroe Dec 16, 2025
2e9fcb0
chore: remove obsolete splinter SQL files and build script
psteinroe Dec 16, 2025
c5f8b07
chore: trigger CI re-run
psteinroe Dec 16, 2025
08d9b38
refactor: remove type aliases from pgls_analyser
psteinroe Dec 16, 2025
4bbff26
fix: resolve clippy warnings in pgls_completions
psteinroe Dec 16, 2025
c3a26e4
Merge main into fix/clippy
psteinroe Dec 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 7 additions & 23 deletions crates/pgls_completions/src/relevance/scoring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,13 @@ impl CompletionScore<'_> {
self.get_table_name()
.map(|t| format!("{t}.{name}"))
.unwrap_or(name.clone())
} else if self.get_table_name().is_some_and(|t| t == qualifier) {
name.clone()
} else if ctx
.get_mentioned_table_for_alias(qualifier)
.is_some_and(|alias_tbl| {
self.get_table_name()
.is_some_and(|item_tbl| alias_tbl == item_tbl)
})
} else if self.get_table_name().is_some_and(|t| t == qualifier)
|| ctx
.get_mentioned_table_for_alias(qualifier)
.is_some_and(|alias_tbl| {
self.get_table_name()
.is_some_and(|item_tbl| alias_tbl == item_tbl)
})
{
name.clone()
} else {
Expand Down Expand Up @@ -309,21 +308,6 @@ impl CompletionScore<'_> {
}
}

fn get_fully_qualified_name(&self) -> String {
match self.data {
CompletionRelevanceData::Schema(s) => s.name.clone(),
CompletionRelevanceData::Column(c) => {
format!("{}.{}.{}", c.schema_name, c.table_name, c.name)
}
CompletionRelevanceData::Table(t) => format!("{}.{}", t.schema, t.name),
CompletionRelevanceData::Function(f) => format!("{}.{}", f.schema, f.name),
CompletionRelevanceData::Policy(p) => {
format!("{}.{}.{}", p.schema_name, p.table_name, p.name)
}
CompletionRelevanceData::Role(r) => r.name.clone(),
}
}

fn get_table_name(&self) -> Option<&str> {
match self.data {
CompletionRelevanceData::Column(c) => Some(c.table_name.as_str()),
Expand Down