#![cfg_attr(not(feature = "std"), no_std)]
#![warn(missing_docs)]
#![deny(unsafe_code)]
#[cfg(all(not(feature = "std"), not(feature = "alloc")))]
compile_error!(
"tds-protocol requires either the `std` feature (default) or the `alloc` feature. \
Enable at least one: `--features std` or `--features alloc`"
);
#[cfg(feature = "alloc")]
extern crate alloc;
mod prelude;
pub mod codec;
pub mod collation;
pub mod crypto;
pub mod error;
pub mod login7;
pub mod packet;
pub mod prelogin;
pub mod rpc;
pub mod sql_batch;
pub mod token;
pub mod tvp;
pub mod types;
pub mod version;
pub use error::ProtocolError;
pub use login7::{
FeatureExtension, FeatureId, Login7, OptionFlags1, OptionFlags2, OptionFlags3, TypeFlags,
};
pub use packet::{
DEFAULT_PACKET_SIZE, MAX_PACKET_SIZE, PACKET_HEADER_SIZE, PacketHeader, PacketStatus,
PacketType,
};
pub use prelogin::{EncryptionLevel, PreLogin, PreLoginOption};
pub use rpc::{ParamFlags, ProcId, RpcOptionFlags, RpcParam, RpcRequest, TypeInfo as RpcTypeInfo};
pub use sql_batch::{SqlBatch, encode_sql_batch, encode_sql_batch_with_transaction};
pub use token::{
ColMetaData, Collation, ColumnData, Done, DoneInProc, DoneProc, DoneStatus, EnvChange,
EnvChangeType, EnvChangeValue, FeatureExtAck, FedAuthInfo, LoginAck, NbcRow, Order, RawRow,
ReturnValue, ServerError, ServerInfo, SessionState, SspiToken, Token, TokenParser, TokenType,
TypeInfo,
};
pub use tvp::{
TVP_END_TOKEN, TVP_ROW_TOKEN, TVP_TYPE_ID, TvpColumnDef as TvpWireColumnDef, TvpColumnFlags,
TvpEncoder, TvpWireType, encode_tvp_bit, encode_tvp_date, encode_tvp_datetime2,
encode_tvp_datetimeoffset, encode_tvp_decimal, encode_tvp_float, encode_tvp_guid,
encode_tvp_int, encode_tvp_null, encode_tvp_nvarchar, encode_tvp_time, encode_tvp_varbinary,
};
pub use types::{ColumnFlags, TypeId, Updateable};
pub use version::{SqlServerVersion, TdsVersion};
pub use crypto::{
ALGORITHM_AEAD_AES_256_CBC_HMAC_SHA256, COLUMN_FLAG_ENCRYPTED, CekTable, CekTableEntry,
CekValue, ColumnCryptoInfo, CryptoMetadata, ENCRYPTION_TYPE_DETERMINISTIC,
ENCRYPTION_TYPE_RANDOMIZED, EncryptionTypeWire, NORMALIZATION_RULE_VERSION,
is_column_encrypted,
};