Revision history for DBIx-Squirrel

Unreleased

    The successor to 1.6.5: a rewrite in modern Perl.

    Code written for 1.x needs changes to run. "Upgrading from 1.x", in
    the reference, lists them:
    https://github.com/nukopian/DBIx-Squirrel/blob/main/docs/REFERENCE.md
    To stay on 1.x, which supports older Perls, install its last
    version: cpanm DBIx::Squirrel@1.6.5. Its code is archived at
    https://github.com/nukopian/DBIx-Squirrel-1.

    - Requires Perl 5.36 or later. Compress::Bzip2, Crypt::CBC, Dotenv,
      JSON::Syck and YAML::Syck are no longer dependencies, and loading
      the module no longer reads a .env file.
    - Placeholders in the styles ?, ?1, :1, $1, :name and $name, one
      style to a statement, each rewritten as ? for the DBI. Quoted
      strings and identifiers, comments, casts and PostgreSQL's
      dollar-quoted bodies are left alone, read by the database's rules;
      the ekorn_dialect attribute names the database behind DBD::ODBC
      or DBD::Proxy. DBD::Pg's placeholder options are followed.
      Comments are passed on to the database, where 1.x removed them.
    - A numbered or named placeholder takes one value wherever it
      appears. Named values come as pairs or in a hash reference, with
      or without the sigil, and an array reference stands for the
      values in it. Values that don't match the placeholders croak, and
      so does executing a statement with some left unbound.
    - A statement can be a string, lines in an array reference, a code
      reference returning either, or a statement handle.
    - do and the select methods take bind values without the
      attributes in front. do returns what the DBI's do returns, in any
      context: 1.x also returned the statement handle in list context.
    - connect and prepare croak if they fail, whatever RaiseError says.
      connect clones a database handle given in place of a data source.
    - Errors, and the DBI's warnings, are reported at the line that
      called DBIx::Squirrel, naming the method called, as plain DBI
      reports them.
    - iterate returns a DBIx::Squirrel::Iterator, replacing
      DBIx::Squirrel::it, with next, all, single, reset, count and sth,
      and no aliases. next no longer sets $_, and single croaks on a
      second result, where 1.x warned. Rows are fetched 100 at a time,
      in the shape the ekorn_slice attribute gives, replacing slice,
      cache_size and their defaults.
    - Stages, 1.x's transformations, follow the bind values. Each takes
      a value as its argument and in $_, and returns nothing to drop it,
      one value, or several. Stop, from DBIx::Squirrel::Stop, ends a
      pipeline early, and DBIx::Squirrel::Context gives a stage its
      iterator, result_number and result_original.
    - DBIx::Squirrel::Pipeline runs any values through stages, and pipe
      and tap run a database or statement handle through them.
    - results returns a DBIx::Squirrel::Results, replacing
      DBIx::Squirrel::rs, whose rows are DBIx::Squirrel::Result objects,
      replacing DBIx::Squirrel::rc: one class for each list of column
      names, with a method for each column, in lower case. get_column
      takes a name or a position, and the ekorn_result_class attribute
      sets the rows' base class.
    - DBIx::Squirrel::Sugar replaces database_entities: a function for
      each database, connected when it's first used, and for each
      statement, with stages of its own.
    - prepare_cached keeps apart statements rewritten the same, such as
      SELECT :a, :b and SELECT :b, :a, and never hands out a handle an
      iterator is part way through.
    - The ekorn_finish_active attribute finishes a statement still
      active before executing it again.
    - Attributes starting ekorn_ aren't passed on to the DBI. Given to
      connect, they're the defaults for every statement the handle
      prepares.
    - use DBIx::Squirrel takes the names the DBI exports, such as
      :sql_types, as use DBI does.
    - Gone, as out of scope: DBIx::Squirrel::Crypt::Fernet, the
      DBIx::Squirrel::Transform modules, load_tuples, and the file and
      encoding helpers in DBIx::Squirrel::util.
