Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Database Laravel Package

nette/database

Nette Database is a lightweight PHP database layer with a fluent query builder, safe parameter binding, and convenient data fetching. Works with PDO and integrates with Nette, offering transactions, profiling, and easy exploration of results.

View on GitHub
Deep Wiki
Context7
v3.2.8
  • support for PHP 8.5
  • OciDriver: in case of applyLimit with different offset returns always the same result
v3.2.7
  • SqlPreprocessor: IN() inserts parameters directly and bypasses binding
  • added GroupedSelection::refreshData()
  • Reflection: added comment to Column and Table
  • Structure: removed unused parameter
v3.2.6
  • fixed performance issue of ActiveRow #312
  • ConnectionPanel: added whole stack trace listing
  • ConnectionPanel: fixed source resolution
  • ConnectionPanel: table does not exceed the window
  • ConnectionPanel: convert templates to Latte-like syntax
  • Selection: factory methods moved to Explorer
  • SqlPreprocessor: added braces around where conditions
  • SqlPreprocessor: fixed bugs in WHERE
  • big refactoring of SqlPreprocessor
  • deprecated Driver::SupportSubselect
  • Selection::fixedAssoc() silently deprecated
  • SQLite: column type can be omitted #315
v3.2.5
  • ResultSet: added fetchList() as alias for fetchFields() & shortcuts
  • ResultSet::fetchAssoc() returns associative array by default, added shortcuts
  • removed dead code
v4.0.0-RC1

Main Features

  • Ability to create drivers for additional PHP database extensions, not just PDO
  • Merging of Connection & Explorer
  • Improved control over data type transformation with options convertBoolean, convertDateTime, and convertDecimal

Changes

  • Connection::getInsertId() now returns integers
  • The options convertBoolean and newDateTime (returns date as Nette\Database\DateTime) are enabled by default
  • Removed interfaces IRow and IRowContainer
  • Removed methods Connection::getPdo() and getDsn()
v3.2.4
  • ResultSet, Selection: fetchPairs() accepts callback
  • Selection: support for generics
  • drivers: improved getting db structure
  • Reflection improvements
  • normalizeRow(): removed extra float handling #307
  • Helpers::detectType() supports 'INT UNSIGNED'
  • md5 replaced with xxHash
  • removed return type 'never' to allow inheritance #303
  • MySQL: supportBooleans renamed to convertBoolean
  • PascalCase constants
  • MySqlDriver::initialize() removed support for 'utf8' charset before 5.5.3
  • Selection: fixed type error on empty aggregations #309
  • SqlsrvDriver::applyLimit() removed support for SQL Server < 2012
  • support for PHP 8.4
v3.2.1
  • added reflection for Table, Column, Index, ForeignKey
  • returns date-time as immutable Nette\Database\DateTime (when 'newDateTime' is enabled) #270
v3.1.5
  • SqlTranslator: convert BackedEnum to scalar (thanks @milo)
  • normalizeRow() don't return small float as string #289
  • drivers: updated getForeignKeys() #281
  • ConnectionPanel::initialize() replaces Helpers::initializeTracy()
  • DatabaseExtension: creates service '.explorer' as alias to '.context'
  • PgSqlDriver: support for partitioned tables (#286)
  • PgSqlDriver: getColumns() for materialized view too
  • coding style
v3.2.0
  • requires PHP 8.1
  • added PHP 8 typehints, uses PHP 8.1 features
  • MySqlDriver: DECIMAL with precision=0 is returned as int (BC break)
  • normalizeRow: converts zero-date 0000-00-00 to NULL (BC break)
  • normalizeRow: time columns resets date to 0001-01-01 (BC break)
  • Numeric/decimal data type is detected as FIELD_DECIMAL
  • MySqlDriver: TINYINT(1) is returned as bool (when 'supportBooleans' is enabled)
v3.1.9
  • support for PHP 8.3
  • used PhpStorm Language attribute
v3.1.7
  • composer: allows nette/utils 4.0
v3.1.6
  • support for PHP 8.2
  • ConnectionPanel: detecting source without filesystem check
  • used #[\SensitiveParameter] to mark sensitive parameters
  • cs
v3.1.4
  • support for PHP 8.1
  • Fixed aggregations when group by and having conditions are used (#284)
  • queryArgs() & ResultSet::getConnection() are silently deprecated
v3.1.3
  • Connection, ResultSet: added custom row normalizer #138
  • Added support to PostgreSQL identity column (#277)
  • Helpers::initializeTracy() does not create a panel in production mode
v3.1.2
  • Connection, Explorer: beginTransaction(), commit() & rollBack() calls are forbidden in transaction()
  • Connection, Explorer::transaction() call can be nested
  • Connection, Explorer::transaction(): pass self as a callback argument
  • Revert "MySqlDriver driver uses subqueries (#265)"
  • SqlPreprocessor: fixed handling 'IN (?)' #273
  • fixed compatibility with Symfony DebugClassLoader #272
  • improved phpDoc
  • readme: updated badge
  • Helpers::initializeTracy() replaces createDebugPanel()
  • compatibility: improved code hinting
v3.1.1
  • SqlPreprocessor: default array mode is 'set' #268
  • events: added default values & removed magic

For the details you can have a look at the diff.

v3.1.0
  • requires PHP 7.2
  • SqlPreprocessor: support for IN ? and IN (?) [Closes #256]
  • SqlPreprocessor::formatValue() rejects array unless they are explicitly allowed (possible BC break)
  • Connection, Explorer: added transaction()
  • MySqlDriver driver uses subqueries (#265)
  • removed I from interface prefixes, ISupplementalDriver -> Driver
  • renamed Nette\Database\Context -> Explorer
  • deprecated interfaces IRow & IRowContainer
v2.4.11

compatible with PHP 8.0

v3.0.7
  • compatible with PHP 8.0
  • ConnectionPanel: added data-order to be sortable by time
  • ConnectionPanel: Added performance colors (#258)
  • DatabaseExtension: detects Tracy by presence of service [@Tracy](https://github.com/Tracy)\BlueScreen nette/di#245
  • ConnectionPanel: bypasses SqlPreprocessor for explain to avoid double processing #259

For the details you can have a look at the diff.

v2.4.10
  • Fixed Selection::insert spoiling PDO:lastInsertId (#253)
  • DatabaseExtension: better detection of single/multiple definitions vol 2 #219

For the details you can have a look at the diff.

v3.0.6
  • Helpers: Fix dumpSql() for bool parameters (#251)
  • SqlPreprocessor: recoginzes (SELECT) UNION (SELECT) as parameteric command #248
  • SqlPreprocessor: correctly escapes scalars when parameters are not used
  • ConnectionPanel: uses capturing
  • Revert "ConnectionPanel: params are useless for EXPLAIN"
  • SqlPreprocessor: multi-insert accepts Row objects #247
  • ResultSet: muted warnings
  • Row: compatibility with operator ??

For the details you can have a look at the diff.

v3.0.5
  • ConnectionPanel: params are useless for EXPLAIN
  • DriverException: added params, ConnectionPanel shows them
  • DriverException: mimics original file&line of PDOException
  • PgSqlDriver: stop using adsrc column (#242)

For the details you can have a look at the diff.

v3.0.4
  • supports PHP 7.4
  • SqlPreprocessor: INSERT with multiple arrays is key-dependent #238
  • ConnectionPanel - highlight INSERT|UPDATE|DELETE (#237)

For the details you can have a look at the diff.

v3.0.3
  • SqlPreprocessor: fixed casting to string
  • Structure: foreign keys with less columns have bigger priority (#170)
  • Structure tests: driver should return also name of foreign key constraint
  • fixed typehint (#236)

For the details you can have a look at the diff.

v2.4.9
  • supports PHP 7.4
  • Revert "DatabaseExtension: better detection of single/multiple definitions" #219

For the details you can have a look at the diff.

v3.0.2
  • ResultSet: added workaround for PDO bug #38546 (#231)
  • SqlPreprocessor: generates IS NOT NULL (#226)
  • Revert "Table: moved caching related functionality to separate classes (#185)"
  • Structure::getBelongsToReference() return value fix
  • Selection: typefix for referencing table primary key
  • ResultSet: only format strings as floats (#228)
  • SqlBuilder: Fixed loading arguments for left join conditions (#224)
  • Use phpstan callable format (#220)

For the details you can have a look at the diff.

v3.0.1
  • DatabaseExtension: uses configuration Schema
  • Revert "DatabaseExtension: better detection of single/multiple definitions" #219
  • ConnectionPanel: fixed bad source file nette/tracy#346

For the details you can have a look at the diff.

v3.0.0

Features

  • requires PHP 7.1
  • uses declare(strict_types=1)
  • uses PHP 7.1 scalar and return type hints
  • Helpers::loadFromFile added $onProgress
  • SqlBuilder::tryDelimite() ignores casting ::int
  • MsSql support for tables, columns, indexes, foreign keys (#215)
  • Selection: fixed insert spoiling PDO:lastInsertId (#217)
  • SqlBuilder: fixed compatiblity with PCRE2 used in PHP 7.3 [Closes #210]

Changes

  • SqlPreprocessor: scalar are always passed via bindValue() (BC break)
  • ResultSet: changed empty result return type of fetch() and fetchField() methods from FALSE to NULL [BC Break]
  • removed unused ISupplementalDriver::normalizeRow() (BC break)
  • removed unused ISupplementalDriver::formatBool()
  • ISupplementalDriver: uncommented formatDateInterval() & getPrimaryAutoincrementKey()
  • added ISupplementalDriver::initialize(), is used instead of constructor (BC break!)
  • IRowContainer: Added method fetchField() (BC break)
  • remove old sqlite2 driver (#155)
  • removed meta info unsigned, onDelete, onUpdate
  • Table: moved caching related functionality to separate classes (#185)
v2.4.8
  • SqlBuilder: fixed compatiblity with PCRE2 used in PHP 7.3 #208 #210
  • PgSqlDriver: uses cache for getColumnTypes() to avoid excessive number of queries #212
  • SqlPreprocessor: enables database parameters only for SELECT, INSERT, UPDATE, DELETE, REPLACE and EXPLAIN #211
  • Connection::quote() throws exception on error (related to #202)

For the details you can have a look at the diff.

v2.4.7
  • Selection: Fixed accidental deletion of referenced cached rows when emptyResultSet is called (#187)(#207)
  • SqlBuilder: added method resetSelect (#146)
  • Fixed Helpers::dumpResult with non-string values (#204)
  • Connection, Context: added fetchFields()
  • SqlPreprocessor: strings are always passed via bindValue() (possible BC break)
  • SqlPreprocessor: PDO::quote() returns false for ODBC driver #202
  • OdbcDriver: doesn't support meta
  • MySqlDriver: Fix PDO::ATTR_CASE (#199)
  • added Connection::getLastQueryString()
  • appveyor: is unable to start MSSQL 2008, 2012 & 2014 together

For the details you can have a look at the diff.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport