NAME

DBIO::MSSQL::Storage - Base Class for Microsoft SQL Server support in DBIO

VERSION

version 0.900000

DESCRIPTION

Storage driver for Microsoft SQL Server databases. Handles identity column (autoincrement) retrieval via SCOPE_IDENTITY(), proper MONEY column casting on insert/update, ordered subselect safety checks, savepoint support, deferred foreign key checks via sp_msforeachtable, and datetime parsing.

The limit dialect (RowNumberOver or Top) is detected automatically from the server version. Uses DBIO::MSSQL::SQLMaker for SQL generation.

METHODS

last_insert_id

Returns the last identity value inserted, as retrieved by SCOPE_IDENTITY() or the fallback _identity_method.

sqlt_type

Returns SQLServer, identifying this storage to SQL::Translator.

with_deferred_fk_checks

$storage->with_deferred_fk_checks(sub { ... });

Runs the supplied coderef with all foreign key constraints disabled via sp_msforeachtable. Constraints are re-enabled and explicitly verified afterwards, and the transaction is committed.

SEE ALSO

AUTHOR

DBIO & DBIx::Class Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.