pub struct Config {Show 17 fields
pub url: String,
pub auth_method: AuthMethod,
pub sql_port: u16,
pub pool_max_size: u32,
pub trust_server_cert: bool,
pub api_version: String,
pub log_level: String,
pub rate_limit: u32,
pub timeout_ms: u64,
pub cache_size: u32,
pub retry_attempts: u32,
pub transport: Transport,
pub host: String,
pub port: u16,
pub cors_allow: Option<String>,
pub default_database: Option<String>,
pub read_only: bool,
}Fields§
§url: StringThe SQL Server instance to connect to: host or host:port (TDS,
not HTTP — mcpify’s originally-generated field name/semantics for
“where the target API lives” carried over unchanged, only what it
means changed). Falls back to sql_port/the TDS default (1433) when
no :port suffix is present — see Config::host_and_port.
auth_method: AuthMethod§sql_port: u16§pool_max_size: u32Maximum size of the pooled SQL Server connections
(services::sql_pool) kept open at once.
trust_server_cert: boolWhether to trust the server’s TLS certificate without verifying it
against a CA — on by default since this project’s primary use case
is a local Docker/dev instance with a self-signed cert (see
docs/sqlserver-eda-openapi-pipeline/docker-compose.yml); set to
false for a production instance with a real CA-signed cert.
api_version: Stringv8 multi-version support: an opaque label (not a compile-time enum
like AuthMethod — version labels are arbitrary operator-supplied
strings such as "10.2.14", which can’t cleanly become Rust
identifiers), validated at runtime against the known version list
in data::store::resolve_store_path/validation::validator.
log_level: String§rate_limit: u32§timeout_ms: u64§cache_size: u32§retry_attempts: u32§transport: Transport§host: String§port: u16§cors_allow: Option<String>§default_database: Option<String>Server-wide fallback for an operation’s optional execution_database
request property (see services::api_client::ApiClient::execute and
docs/sqlserver-eda-openapi-pipeline/README.md’s “OpenAPI mapping
convention”) when a caller doesn’t supply one. Added by hand, not by
mcpify — this field has no corresponding OpenAPI schema property to
generate from, since it’s server configuration, not a per-call
argument. Like auth::strategies::windows::WindowsAuthStrategy, this
needs to be re-added after every mcpify sync (see
docs/sqlserver-eda-openapi-pipeline/scripts/regenerate_mcp_server.sh’s
header comment). Left unset, a call with no execution_database
falls through to the connection’s own current database context
(DB_NAME()/DB_ID()) – this field is purely an optional
convenience default, never required.
read_only: boolSafeguard independent of the connecting login’s actual SQL Server
grants. T-SQL has no session-level “read only” GUC the way
PostgreSQL’s default_transaction_read_only does, so this is
enforced by object classification instead: when true (the default),
call refuses any operation whose catalog type_desc isn’t VIEW
or a *_FUNCTION kind (see services::api_client::build_statement)
— a SELECT against a view can’t write, and T-SQL functions are
language-level prohibited from having side effects, so both are
genuinely engine-guaranteed read-only, not just app-level sniffing.
Stored procedures (SQL_STORED_PROCEDURE/EXTENDED_STORED_PROCEDURE)
have no such guarantee — SQL Server places no restriction on what a
procedure body can do — so those are rejected outright, along with
any object whose classification is missing/unrecognized (fail
closed rather than assume it’s safe). Set to false to allow call
to invoke stored procedures.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Configwhere
RawVecInner: Send,
impl Sync for Configwhere
RawVecInner: Sync,
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Configwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more