DBIO-Sybase

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

META.yml
Makefile.PL
README
README.md
SECURITY.md
cpanfile
dist.ini
docs/adr/0001-per-engine-subdir-helper-pattern.md
docs/adr/0002-ase-multi-storage-writer-and-bulk-connections.md
docs/adr/0003-runtime-rebless-and-dynamic-freetds-trait.md
docs/adr/0004-identity-retrieval-via-select-max-in-locked-txn.md
docs/adr/0005-deploy-via-real-temp-database-not-in-memory.md
lib/DBIO/Shortcut/syb.pm
lib/DBIO/Sybase.pm
lib/DBIO/Sybase/DDL.pm
lib/DBIO/Sybase/Deploy.pm
lib/DBIO/Sybase/Diff.pm
lib/DBIO/Sybase/Diff/Column.pm
lib/DBIO/Sybase/Diff/ForeignKey.pm
lib/DBIO/Sybase/Diff/Index.pm
lib/DBIO/Sybase/Diff/Table.pm

lib/DBIO/Sybase/Storage/ASE.pm  view on Meta::CPAN

=head1 DESCRIPTION

Storage driver for Sybase ASE (Adaptive Server Enterprise) databases via
L<DBD::Sybase>.

If your Sybase version does not support placeholders, the storage is reblessed
to C<DBIO::Sybase::Storage::ASE::NoBindVars> automatically. FreeTDS connections
are supported but TEXT/IMAGE columns will not work; use the native Sybase
OpenClient libraries for full functionality.

Autoincrement retrieval is done via C<SELECT MAX(col)> inside a locked
transaction, as Sybase ASE provides no single-statement equivalent of
C<SCOPE_IDENTITY()>. TEXT/IMAGE (blob) columns require a separate write
operation on a dedicated connection and are handled transparently.

Bulk inserts use the L<DBD::Sybase> bulk API when available.

=head1 METHODS

=head2 connect_call_blob_setup

share/skills/dbio-sybase-database/SKILL.md  view on Meta::CPAN

- **datetime / smalldatetime** — `SMALLDATETIME` has only minute precision.
  Driver sets `syb_date_fmt('ISO_strict')` for output and `SET DATEFORMAT mdy`
  for input. Custom format class parses `%Y-%m-%dT%H:%M:%S.%3NZ`, formats
  `%m/%d/%Y %H:%M:%S.%3N`.

## Identity (autoincrement)

ASE uses an **`IDENTITY`** column attribute (emitted as `... IDENTITY` in DDL),
not a sequence. There is no `SCOPE_IDENTITY()` equivalent.

- Default retrieval: `SELECT MAX(col) FROM table` inside a locked transaction on
  the writer connection (the "dumb last_insert_id hack").
- `@@IDENTITY` is the connection-global alternative; when `_identity_method` is
  `'@@IDENTITY'` the `SELECT MAX` hack is skipped.
- Inserting an explicit identity value requires `SET IDENTITY_INSERT` (via
  `DBIO::Storage::DBI::IdentityInsert`); updating one requires identity-update flags.
- Identity columns are detected in introspection from `syscolumns.status & 128`
  (bit `0x80`) — INFORMATION_SCHEMA does not expose this.
- `INSERT ... DEFAULT VALUES` is unsupported; the driver emits explicit `DEFAULT`
  per column instead (skipping identity, timestamp, computed columns).



( run in 0.704 second using v1.01-cache-2.11-cpan-5e09290becf )