Skip to content

Commit d94e89c

Browse files
authored
Merge branch 'main' into feat/dblint
2 parents 323915d + 376654e commit d94e89c

File tree

6 files changed

+21
-10
lines changed

6 files changed

+21
-10
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
SQLX_OFFLINE=true
12
DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:5432/postgres

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ensure consistent line endings for SQL files across all platforms
2+
# This is required for sqlx offline mode to generate consistent query hashes
3+
# see https://github.com/launchbadge/sqlx/issues/1494
4+
*.sql text eol=lf

.github/workflows/pull_request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- "Cargo.lock"
1313
- "rust-toolchain.toml"
1414
- "rustfmt.toml"
15+
- ".env"
1516
# or in js packages
1617
- "packages/**"
1718
# or in workflows

crates/pgls_cli/tests/assert_check.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ fn check_stdin_snapshot() {
6565
"--config-path",
6666
CONFIG_PATH,
6767
"--stdin-file-path",
68-
"virtual.sql"
68+
"virtual.sql",
69+
"--log-level",
70+
"none"
6971
],
7072
Some("alter tqjable stdin drop column id;\n"),
7173
None
@@ -87,7 +89,7 @@ fn check_directory_traversal_snapshot() {
8789
}
8890

8991
fn run_check(args: &[&str]) -> String {
90-
let mut full_args = vec!["--config-path", CONFIG_PATH];
92+
let mut full_args = vec!["--config-path", CONFIG_PATH, "--log-level", "none"];
9193
full_args.extend_from_slice(args);
9294
run_check_with(&full_args, None, None)
9395
}

crates/pgls_lsp/tests/server.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -858,19 +858,18 @@ async fn test_execute_statement(test_db: PgPool) -> Result<()> {
858858
server.load_configuration().await?;
859859

860860
let users_tbl_exists = async || {
861-
let result = sqlx::query!(
861+
sqlx::query_scalar::<_, bool>(
862862
r#"
863863
select exists (
864-
select 1 as exists
864+
select 1
865865
from pg_catalog.pg_tables
866866
where tablename = 'users'
867-
);
868-
"#
867+
)
868+
"#,
869869
)
870870
.fetch_one(&test_db.clone())
871-
.await;
872-
873-
result.unwrap().exists.unwrap()
871+
.await
872+
.unwrap()
874873
};
875874

876875
assert!(

docs/manual_installation.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ You have to pick the correct binary for your platform. The following table shoul
2020

2121
### Homebrew
2222

23-
We were not able to publish to Homebrew yet due to naming conflicts. We are actively working to resolve this.
23+
Postgres Language Server is available as a [Homebrew formula](https://formulae.brew.sh/formula/postgres-language-server) for macOS and Linux users.
24+
25+
```sh
26+
brew install postgres-language-server
27+
```
2428

2529
### Using a published binary
2630

0 commit comments

Comments
 (0)