Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- uses: actions-rs/toolchain@v1

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand Down Expand Up @@ -108,20 +108,20 @@ jobs:

- name: Setup PowerShell module cache
id: cacher
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.psmodulecache.outputs.modulepath }}
key: ${{ steps.psmodulecache.outputs.keygen }}

- name: Setup Chocolatey download cache
id: chococache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey\
key: chocolatey-install

- name: Setup Cargo build cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
C:\Users\runneradmin\.cargo\registry
Expand Down
4 changes: 2 additions & 2 deletions src/client/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ impl<S: AsyncRead + AsyncWrite + Unpin + Send> Connection<S> {
encryption: EncryptionLevel,
) -> crate::Result<Self> {
if encryption != EncryptionLevel::NotSupported {
event!(Level::INFO, "Performing a TLS handshake");
event!(Level::DEBUG, "Performing a TLS handshake");

let Self {
transport, context, ..
Expand All @@ -458,7 +458,7 @@ impl<S: AsyncRead + AsyncWrite + Unpin + Send> Connection<S> {
};

stream.get_mut().handshake_complete();
event!(Level::INFO, "TLS handshake successful");
event!(Level::DEBUG, "TLS handshake successful");

let transport = Framed::new(MaybeTlsStream::Tls(stream), PacketCodec);

Expand Down
2 changes: 1 addition & 1 deletion src/client/tls_stream/native_tls_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub(crate) async fn create_tls_stream<S: AsyncRead + AsyncWrite + Unpin + Send>(
builder = builder.use_sni(false);
}
TrustConfig::Default => {
event!(Level::INFO, "Using default trust configuration.");
event!(Level::DEBUG, "Using default trust configuration.");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/client/tls_stream/opentls_tls_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub(crate) async fn create_tls_stream<S: AsyncRead + AsyncWrite + Unpin + Send>(
builder = builder.use_sni(false);
}
TrustConfig::Default => {
event!(Level::INFO, "Using default trust configuration.");
event!(Level::DEBUG, "Using default trust configuration.");
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/client/tls_stream/rustls_tls_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn get_server_name(config: &Config) -> crate::Result<ServerName> {

impl<S: AsyncRead + AsyncWrite + Unpin + Send> TlsStream<S> {
pub(super) async fn new(config: &Config, stream: S) -> crate::Result<Self> {
event!(Level::INFO, "Performing a TLS handshake");
event!(Level::DEBUG, "Performing a TLS handshake");

let builder = ClientConfig::builder().with_safe_defaults();

Expand Down Expand Up @@ -129,7 +129,7 @@ impl<S: AsyncRead + AsyncWrite + Unpin + Send> TlsStream<S> {
config
}
TrustConfig::Default => {
event!(Level::INFO, "Using default trust configuration.");
event!(Level::DEBUG, "Using default trust configuration.");
builder.with_native_roots().with_no_client_auth()
}
};
Expand Down
17 changes: 17 additions & 0 deletions src/tds/numeric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,23 @@ mod decimal {
Numeric::new_with_scale(value, self_.scale() as u8)
});
);

#[cfg(feature = "tds73")]
into_sql!(self_,
Decimal: (ColumnData::Numeric, {
let unpacked = self_.unpack();

let mut value = (((unpacked.hi as u128) << 64)
+ ((unpacked.mid as u128) << 32)
+ unpacked.lo as u128) as i128;

if self_.is_sign_negative() {
value = -value;
}

Numeric::new_with_scale(value, self_.scale() as u8)
});
);
}

#[cfg(feature = "bigdecimal")]
Expand Down
6 changes: 3 additions & 3 deletions src/tds/stream/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,20 @@ where
_ => (),
}

event!(Level::INFO, "{}", change);
event!(Level::DEBUG, "{}", change);

Ok(ReceivedToken::EnvChange(change))
}

async fn get_info(&mut self) -> crate::Result<ReceivedToken> {
let info = TokenInfo::decode(self.conn).await?;
event!(Level::INFO, "{}", info.message);
event!(Level::DEBUG, "{}", info.message);
Ok(ReceivedToken::Info(info))
}

async fn get_login_ack(&mut self) -> crate::Result<ReceivedToken> {
let ack = TokenLoginAck::decode(self.conn).await?;
event!(Level::INFO, "{} version {}", ack.prog_name, ack.version);
event!(Level::DEBUG, "{} version {}", ack.prog_name, ack.version);
Ok(ReceivedToken::LoginAck(ack))
}

Expand Down