NAME
DBIO::Informix::Test::Conformance - Answers the shared conformance case table for the Informix driver
VERSION
version 0.900007
SYNOPSIS
use DBIO::Informix::Test::Conformance;
DBIO::Informix::Test::Conformance->run('DDL');
done_testing;
DESCRIPTION
The driver's half of the shared case table of DBIO::Test::Conformance (core ADR 0060). Core owns the cases and the runner; this class says how to reach an Informix server, how to install a declaration into it through DBIO::Informix::Deploy, and how to read a fact back through DBIO::Informix::Introspect and the sys* catalog.
The server is the one DBIO_TEST_INFORMIX_DSN, DBIO_TEST_INFORMIX_USER and DBIO_TEST_INFORMIX_PASS name; without the DSN (or without DBD::Informix) only the declarations are checked. The user needs the right to create and drop databases: "diff" in DBIO::Informix::Deploy builds its target in a throwaway database next to the live one.
The namespace of a case is the test database itself. Informix has no schemas, so a case cannot be given one of its own, and the diff compares the whole visible database. "conformance_namespace" therefore refuses to run in a database that holds a table or view already (it is not this run's to drop), and otherwise returns the mark of the case: the names of the tables and views its sources will create. "conformance_cleanup" removes those objects and nothing else (their foreign keys, then the views, then the tables), through a connection of its own, after the case's connection is closed. The server is shared: the class touches nothing server-wide, only objects of the mark in the database of the DSN.
METHODS
conformance_live_available
True when DBIO_TEST_INFORMIX_DSN is set and DBD::Informix loads.
conformance_connect
Loads the Informix schema component into the case's schema class and connects with the parameters of the driver's own live tests.
conformance_namespace
Checks that the database holds no user table or view and returns the mark of the case: { tables => [ ... ], views => [ ... ] }, the names of the tables and views the sources of the schema will create, and, for a Diff case, the ones its second declaration adds (a literal name, table(\'x'), and a subquery source are not named; a source twice over one name once). A database that holds a relation already is not the run's to use or clean: the case ends with the names of what is there, and there is no mark.
conformance_install
Installs the declaration with $schema->deploy, the public entry point, which hands over to "install" in DBIO::Informix::Deploy.
conformance_cleanup
Disconnects the case's connection, then removes the objects of the mark conformance_namespace returned -- first their foreign keys, then the views, then the tables, each where it exists -- through a connection of its own. Without a mark (the namespace seam threw: the database was not empty) it only disconnects. It never drops "everything in the database": what is there and not named by the mark is somebody else's.
conformance_diff_is_empty
True when "diff" in DBIO::Informix::Deploy of the installed schema against the same declaration has no changes.
conformance_upgrade
Loads the Informix component into the target schema class, connects it with the parameters of "conformance_connect" and runs "upgrade" in DBIO::Informix::Deploy -- the public entry point -- through it, with allow_destructive => 1 (the upgrade cases drop and change on purpose; the guard itself is the deploy cases of "conformance_deploy"). The connected target schema is returned. A refusal of the diff is thrown from here as it came.
conformance_deploy
Same connecting as "conformance_upgrade", but returns the deploy object over the connected target schema, DBIO::Informix::Deploy->new(schema => $to), for the deploy cases of the Diff list (ADR 0080): apply and upgrade are those of DBIO::Deploy::Base, dry_run executes nothing, and a diff with a drop needs allow_destructive.
conformance_answered_through
The table versions the answers were written against, per area: { DDL => 2, Diff => 4, Bind => 1 }.
conformance_refusals
The declared refusals and deviations; see the list in the source, each entry carries its reason.
conformance_fact
Reads one fact through DBIO::Informix::Introspect (unique constraints and the index count straight from sysconstraints and sysindexes); the vocabulary is the one of "Facts" in DBIO::Test::Conformance.
SEE ALSO
DBIO::Test::Conformance - the runner and the contract of the seams
DBIO::Test::Conformance::Cases::DDL - the DDL case list
DBIO::Informix::Deploy - install and diff, as the cases reach them
DBIO::Informix::Introspect - what the facts are read through
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.