Skip to content

Commit 6cffdbf

Browse files
committed
Adds v16 feature
1 parent 718b8d3 commit 6cffdbf

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed

.github/workflows/ci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
matrix:
3636
rust: ["stable", "beta", "nightly"]
3737
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
38-
pg: ["10", "11", "12", "13", "14", "15"]
38+
pg: ["10", "11", "12", "13", "14", "15", "16"]
3939
mode: ["debug", "release"]
4040
exclude:
4141
- os: "macos-latest"
@@ -48,6 +48,8 @@ jobs:
4848
pg: "13"
4949
- os: "macos-latest"
5050
pg: "15"
51+
- os: "macos-latest"
52+
pg: "16"
5153
- os: "windows-latest"
5254
pg: "11"
5355
- os: "windows-latest"
@@ -58,6 +60,8 @@ jobs:
5860
pg: "14"
5961
- os: "windows-latest"
6062
pg: "15"
63+
- os: "windows-latest"
64+
pg: "16"
6165
runs-on: ${{ matrix.os }}
6266

6367
steps:

.gitlab-ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ lint:clippy:
2727
<<: *pg
2828
variables:
2929
MODE: debug
30-
PG: "14"
30+
PG: "16"
3131
stage: lint
3232
script:
3333
- rustup component add clippy
@@ -38,7 +38,7 @@ test:
3838
parallel:
3939
matrix:
4040
- MODE: ['debug', 'release']
41-
PG: ['9.5', '9.6', '10', '11', '12', '13', '14']
41+
PG: ['9.5', '9.6', '10', '11', '12', '13', '14', '15', '16']
4242
script: |
4343
feature=''
4444
@@ -81,4 +81,4 @@ arm:
8181
- apt-get update
8282
- apt-get install -y curl git build-essential
8383
- apt-get install -y libc6-armhf-cross libc6-dev-armhf-cross gcc-arm-linux-gnueabihf clang
84-
script: cargo build --all-features --target arm-unknown-linux-gnueabihf
84+
script: cargo build --features v15 --target arm-unknown-linux-gnueabihf

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ v12 = ["v11"]
3737
v13 = ["v12"]
3838
v14 = ["v13", "bitflags"]
3939
v15 = ["v14"]
40+
v16 = ["v15"]

src/connection/_gss.rs

+11
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,15 @@ impl Connection {
1616
pub fn gss_context(&self) -> *const std::ffi::c_void {
1717
unsafe { pq_sys::PQgetgssctx(self.into()) }
1818
}
19+
20+
/**
21+
* Returns `true` if the connection authentication method used GSSAPI. Returns `false` if not.
22+
*
23+
* See
24+
* [PQconnectionUsedGSSAPI](https://www.postgresql.org/docs/16/libpq-status.html#LIBPQ-PQCONNECTIONUSEDGSSAPI).
25+
*/
26+
#[cfg(feature = "v16")]
27+
pub fn used_gssapi(&self) -> bool {
28+
unsafe { pq_sys::PQconnectionUsedGSSAPI(self.into()) != 0 }
29+
}
1930
}

src/connection/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -636,4 +636,12 @@ B 5 ReadyForQuery I
636636
),
637637
);
638638
}
639+
640+
#[test]
641+
#[cfg(feature = "v16")]
642+
fn used_gssapi() {
643+
let conn = crate::test::new_conn();
644+
645+
assert_eq!(conn.used_gssapi(), false);
646+
}
639647
}

0 commit comments

Comments
 (0)