NAME

DBIO::Test::Conformance::Cases::Bind - The shared Bind cases every DBIO driver answers

VERSION

version 0.900004

DESCRIPTION

The Bind list of DBIO::Test::Conformance (ADR 0060): ten cases, B1 to B10 of the ADR's first case list (B9 without its dollar-quoted half), as plain Perl data. A case is one column declaration, the values that go through it and the operations they go through; what is observable is that every value comes back as the application wrote it. It holds no SQL and no driver name.

A case is a hash:

{
  name    => 'bind-long-string',                # stable id, bind- prefix
  since   => 1,                                 # table version that added it
  cards   => [ 'dbio-mssql k47', ... ],         # where it came from; documentation
  subject => { source => 'Val', column => 'v' },
  input   => { sources => [ { ... } ] },
  expect  => [ { bind_roundtrip => { ... } }, ... ],
}

input is a DDL-style declaration ("Input" in DBIO::Test::Conformance) and uses the base types of DBIO::Schema::Type, and varchar with a size for a bounded string (text is a LOB on some servers, which = cannot compare). expect uses the expectation kinds bind_roundtrip, bind_lob_ops and bind_literal ("Expectations" in DBIO::Test::Conformance) and, for B1, rejects. Every operation goes through the runner's data seams, so an async transport can run the list ("Running a list over an async transport" in DBIO::Test::Conformance).

Values that do not fit a literal -- 4 001 to 70 000 characters, every byte value, non-ASCII text -- are built here as Perl expressions. The order is the order of the ADR appendix. Names never change once published; a case that turns out wrong is replaced by a new one with a higher since.

Not in the list

the dollar-quoted half of B9

$$ ... ? ... $$ is PostgreSQL syntax; the generic half (a ? in a string literal and in a comment, next to a real bind) is bind-question-mark-in-literal. The dollar-quoted body is a driver-local case of dbio-postgresql and the dists that ride on it.

the bigint half of B10

9223372036854775807 needs a 64-bit integer type, and the base types have only integer. The exact numeric(20,4) half is bind-numeric-exact.

the float without a column in B3

A float bound to no column has no declaration to carry it; the integer-string half is bind-integer-string-in-expression.

METHODS

cases

my $cases = DBIO::Test::Conformance::Cases::Bind->cases;

An arrayref of the cases. It is a deep copy: a caller cannot damage the next run's table.

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.