NAME
DBIO::MSSQL::Introspect::Views - Introspect MSSQL view definitions
VERSION
version 0.900007
DESCRIPTION
Reads the stored text of the views of one schema from sys.sql_modules. The text is what the server was given: it begins with CREATE VIEW ... AS (or CREATE OR ALTER VIEW), written as the author wrote it. DBIO::MSSQL::Diff::View compares the part after AS.
METHODS
fetch
my $defs = DBIO::MSSQL::Introspect::Views->fetch($dbh, $schema);
A hashref keyed by view name, each value the full definition text. The text is read in pieces of 4000 characters (nvarchar(4000)), because a long value (nvarchar(max)) is cut at the session's TEXTSIZE over DBD::Sybase, without an error. A view whose text the server does not give (an encrypted view) is not in the result.
dependencies
my $deps = DBIO::MSSQL::Introspect::Views->dependencies($dbh, $schema);
For every view of $schema that reads other views (sys.sql_expression_dependencies), a list of [ schema, name ] of the views it reads, keyed by view name. A view that reads no view is not in the result.
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.