Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: nullabe column query#406

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
juleswritescode merged 3 commits intomainfromfix/nullable-query
May 24, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
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

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

2 changes: 1 addition & 1 deletioncrates/pgt_completions/src/providers/columns.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ pub fn complete_columns<'a>(ctx: &CompletionContext<'a>, builder: &mut Completio
description: format!("Table: {}.{}", col.schema_name, col.table_name),
kind: CompletionItemKind::Column,
completion_text: None,
detail:Some(col.type_name.to_string()),
detail: col.type_name.as_ref().map(|t| t.to_string()),
};

// autocomplete with the alias in a join clause if we find one
Expand Down
2 changes: 1 addition & 1 deletioncrates/pgt_schema_cache/src/columns.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -48,7 +48,7 @@ pub struct Column {

pub schema_name: String,
pub type_id: i64,
pub type_name: String,
pub type_name:Option<String>,
pub is_nullable: bool,

pub is_primary_key: bool,
Expand Down
4 changes: 2 additions & 2 deletionscrates/pgt_schema_cache/src/queries/columns.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,10 +52,10 @@ from
and atts.attnum = ix.attnum
left join pg_catalog.pg_attrdef def on atts.attrelid = def.adrelid
and atts.attnum = def.adnum
left join pg_catalog.pg_type tps ontps.oid =atts.atttypid
left join pg_catalog.pg_type tps onatts.atttypid =tps.oid
where
-- system columns, such as `cmax` or `tableoid`, have negative `attnum`s
atts.attnum >= 0
atts.attnum >= 0 and atts.atttypid is not null and tps.oid is not null
order by
schema_name desc,
table_name,
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp