pub struct Login7 {Show 25 fields
pub tds_version: TdsVersion,
pub packet_size: u32,
pub client_prog_version: u32,
pub client_pid: u32,
pub connection_id: u32,
pub option_flags1: OptionFlags1,
pub option_flags2: OptionFlags2,
pub type_flags: TypeFlags,
pub option_flags3: OptionFlags3,
pub client_timezone: i32,
pub client_lcid: u32,
pub hostname: String,
pub username: String,
pub password: String,
pub app_name: String,
pub server_name: String,
pub unused: String,
pub library_name: String,
pub language: String,
pub database: String,
pub client_id: [u8; 6],
pub sspi_data: Vec<u8>,
pub attach_db_file: String,
pub new_password: String,
pub features: Vec<FeatureExtension>,
}Expand description
LOGIN7 packet builder.
Fields§
§tds_version: TdsVersionTDS version to request.
packet_size: u32Requested packet size.
client_prog_version: u32Client program version.
client_pid: u32Client process ID.
connection_id: u32Connection ID (for connection pooling).
option_flags1: OptionFlags1Option flags 1.
option_flags2: OptionFlags2Option flags 2.
type_flags: TypeFlagsType flags.
option_flags3: OptionFlags3Option flags 3.
client_timezone: i32Client timezone offset in minutes.
client_lcid: u32Client LCID (locale ID).
hostname: StringHostname (client machine name).
username: StringUsername for SQL authentication.
password: StringPassword for SQL authentication.
app_name: StringApplication name.
server_name: StringServer name.
unused: StringUnused field.
library_name: StringClient library name.
language: StringLanguage.
database: StringDatabase name.
client_id: [u8; 6]Client ID (MAC address, typically zeros).
sspi_data: Vec<u8>SSPI data for integrated authentication.
attach_db_file: StringAttach DB filename (for LocalDB).
new_password: StringNew password (for password change).
features: Vec<FeatureExtension>Feature extensions.
Implementations§
Source§impl Login7
impl Login7
Sourcepub fn with_tds_version(self, version: TdsVersion) -> Self
pub fn with_tds_version(self, version: TdsVersion) -> Self
Set the TDS version.
Sourcepub fn with_sql_auth(
self,
username: impl Into<String>,
password: impl Into<String>,
) -> Self
pub fn with_sql_auth( self, username: impl Into<String>, password: impl Into<String>, ) -> Self
Set SQL authentication credentials.
Sourcepub fn with_integrated_auth(self, sspi_data: Vec<u8>) -> Self
pub fn with_integrated_auth(self, sspi_data: Vec<u8>) -> Self
Enable integrated (Windows) authentication.
Sourcepub fn with_database(self, database: impl Into<String>) -> Self
pub fn with_database(self, database: impl Into<String>) -> Self
Set the database to connect to.
Sourcepub fn with_hostname(self, hostname: impl Into<String>) -> Self
pub fn with_hostname(self, hostname: impl Into<String>) -> Self
Set the hostname (client machine name).
Sourcepub fn with_app_name(self, app_name: impl Into<String>) -> Self
pub fn with_app_name(self, app_name: impl Into<String>) -> Self
Set the application name.
Sourcepub fn with_server_name(self, server_name: impl Into<String>) -> Self
pub fn with_server_name(self, server_name: impl Into<String>) -> Self
Set the server name.
Sourcepub fn with_packet_size(self, packet_size: u32) -> Self
pub fn with_packet_size(self, packet_size: u32) -> Self
Set the packet size.
Sourcepub fn with_read_only_intent(self, read_only: bool) -> Self
pub fn with_read_only_intent(self, read_only: bool) -> Self
Enable read-only intent for readable secondary connections.
Sourcepub fn with_feature(self, feature: FeatureExtension) -> Self
pub fn with_feature(self, feature: FeatureExtension) -> Self
Add a feature extension.