Full Code of vrana/adminer for AI

master 5754b32693fe cached
261 files
2.1 MB
571.6k tokens
1404 symbols
1 requests
Download .txt
Showing preview only (2,282K chars total). Download the full file or copy to clipboard to get everything.
Repository: vrana/adminer
Branch: master
Commit: 5754b32693fe
Files: 261
Total size: 2.1 MB

Directory structure:
gitextract_k5k2lsdc/

├── .editorconfig
├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   └── bug_report.md
│   └── workflows/
│       └── ci.yml
├── .gitignore
├── .gitmodules
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── SECURITY.md
├── adminer/
│   ├── call.inc.php
│   ├── check.inc.php
│   ├── create.inc.php
│   ├── database.inc.php
│   ├── db.inc.php
│   ├── designs.php
│   ├── download.inc.php
│   ├── drivers/
│   │   ├── mssql.inc.php
│   │   ├── mysql.inc.php
│   │   ├── oracle.inc.php
│   │   ├── pgsql.inc.php
│   │   └── sqlite.inc.php
│   ├── dump.inc.php
│   ├── edit.inc.php
│   ├── elastic.php
│   ├── event.inc.php
│   ├── file.inc.php
│   ├── foreign.inc.php
│   ├── include/
│   │   ├── adminer.inc.php
│   │   ├── auth.inc.php
│   │   ├── bootstrap.inc.php
│   │   ├── connect.inc.php
│   │   ├── coverage.inc.php
│   │   ├── db.inc.php
│   │   ├── design.inc.php
│   │   ├── driver.inc.php
│   │   ├── editing.inc.php
│   │   ├── errors.inc.php
│   │   ├── functions.inc.php
│   │   ├── html.inc.php
│   │   ├── lang.inc.php
│   │   ├── pdo.inc.php
│   │   ├── plugin.inc.php
│   │   ├── plugins.inc.php
│   │   ├── tmpfile.inc.php
│   │   ├── version.inc.php
│   │   └── xxtea.inc.php
│   ├── index.php
│   ├── indexes.inc.php
│   ├── lang/
│   │   ├── ar.inc.php
│   │   ├── bg.inc.php
│   │   ├── bn.inc.php
│   │   ├── bs.inc.php
│   │   ├── ca.inc.php
│   │   ├── cs.inc.php
│   │   ├── da.inc.php
│   │   ├── de.inc.php
│   │   ├── el.inc.php
│   │   ├── en.inc.php
│   │   ├── es.inc.php
│   │   ├── et.inc.php
│   │   ├── fa.inc.php
│   │   ├── fi.inc.php
│   │   ├── fr.inc.php
│   │   ├── gl.inc.php
│   │   ├── he.inc.php
│   │   ├── hi.inc.php
│   │   ├── hr.inc.php
│   │   ├── hu.inc.php
│   │   ├── id.inc.php
│   │   ├── it.inc.php
│   │   ├── ja.inc.php
│   │   ├── ka.inc.php
│   │   ├── ko.inc.php
│   │   ├── lt.inc.php
│   │   ├── lv.inc.php
│   │   ├── ms.inc.php
│   │   ├── nl.inc.php
│   │   ├── no.inc.php
│   │   ├── pl.inc.php
│   │   ├── pt-br.inc.php
│   │   ├── pt.inc.php
│   │   ├── ro.inc.php
│   │   ├── ru.inc.php
│   │   ├── sk.inc.php
│   │   ├── sl.inc.php
│   │   ├── sr.inc.php
│   │   ├── sv.inc.php
│   │   ├── ta.inc.php
│   │   ├── th.inc.php
│   │   ├── tr.inc.php
│   │   ├── uk.inc.php
│   │   ├── uz.inc.php
│   │   ├── vi.inc.php
│   │   ├── xx.inc.php
│   │   ├── zh-tw.inc.php
│   │   └── zh.inc.php
│   ├── privileges.inc.php
│   ├── procedure.inc.php
│   ├── processlist.inc.php
│   ├── schema.inc.php
│   ├── scheme.inc.php
│   ├── script.inc.php
│   ├── select.inc.php
│   ├── sequence.inc.php
│   ├── sql.inc.php
│   ├── sqlite.php
│   ├── static/
│   │   ├── dark.css
│   │   ├── default.css
│   │   ├── editing.js
│   │   └── functions.js
│   ├── table.inc.php
│   ├── trigger.inc.php
│   ├── type.inc.php
│   ├── user.inc.php
│   ├── variables.inc.php
│   └── view.inc.php
├── compile.php
├── composer.json
├── coverage.php
├── designs/
│   ├── README.md
│   ├── adminer-dark/
│   │   ├── README.md
│   │   └── adminer-dark.css
│   ├── brade/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── bueltge/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── dracula/
│   │   ├── README.md
│   │   └── adminer-dark.css
│   ├── esterka/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── flat/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── galkaev/
│   │   ├── README.md
│   │   └── adminer-dark.css
│   ├── haeckel/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── hever/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── konya/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── lavender-light/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── lucas-sandery/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── mancave/
│   │   ├── README.md
│   │   └── adminer-dark.css
│   ├── mvt/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── nette/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── ng9/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── nicu/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── pappu687/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── paranoiq/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── pepa-linha/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── pokorny/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── price/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── rmsoft/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── rmsoft_blue/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── rmsoft_blue-dark/
│   │   ├── README.md
│   │   └── adminer.css
│   └── win98/
│       ├── README.md
│       └── adminer.css
├── developing.md
├── editor/
│   ├── db.inc.php
│   ├── example.php
│   ├── include/
│   │   ├── adminer.inc.php
│   │   ├── connect.inc.php
│   │   └── editing.inc.php
│   ├── index.php
│   ├── script.inc.php
│   ├── sqlite.php
│   └── static/
│       └── editing.js
├── eslint.config.mjs
├── lang.php
├── phpcs.xml
├── phpstan.neon
├── plugins/
│   ├── README.md
│   ├── adminer.js.php
│   ├── backward-keys.php
│   ├── before-unload.php
│   ├── config.php
│   ├── dark-switcher.php
│   ├── database-hide.php
│   ├── designs.php
│   ├── drivers/
│   │   ├── README.md
│   │   ├── clickhouse.php
│   │   ├── elastic.php
│   │   ├── firebird.php
│   │   ├── igdb.php
│   │   ├── imap.php
│   │   ├── mongo.php
│   │   └── simpledb.php
│   ├── dump-alter.php
│   ├── dump-bz2.php
│   ├── dump-date.php
│   ├── dump-json.php
│   ├── dump-php.php
│   ├── dump-xml.php
│   ├── dump-zip.php
│   ├── edit-calendar.php
│   ├── edit-foreign.php
│   ├── edit-textarea.php
│   ├── editor-setup.php
│   ├── editor-views.php
│   ├── email-table.php
│   ├── enum-option.php
│   ├── file-upload.php
│   ├── foreign-system.php
│   ├── frames.php
│   ├── highlight-codemirror.php
│   ├── highlight-monaco.php
│   ├── highlight-prism.php
│   ├── json-column.php
│   ├── login-ip.php
│   ├── login-otp.php
│   ├── login-password-less.php
│   ├── login-servers.php
│   ├── login-ssl.php
│   ├── login-table.php
│   ├── master-slave.php
│   ├── menu-links.php
│   ├── pretty-json-column.php
│   ├── row-numbers.php
│   ├── select-email.php
│   ├── slugify.php
│   ├── sql-gemini.php
│   ├── sql-log.php
│   ├── table-indexes-structure.php
│   ├── table-structure.php
│   ├── tables-filter.php
│   ├── timeout.php
│   ├── tinymce.php
│   ├── translation.php
│   ├── version-github.php
│   └── version-noverify.php
├── tests/
│   ├── add-test.php
│   ├── cockroachdb.html
│   ├── elastic.html
│   ├── generate-pdo.php
│   ├── mariadb.html
│   ├── mssql.html
│   ├── mysql.html
│   ├── pgsql.html
│   ├── screenshots.html
│   ├── screenshots.php
│   └── sqlite.html
└── todo.txt

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
# https://editorconfig.org/
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{php,css,js,xml}]
indent_style = tab

[*.json]
indent_style = space
indent_size = 4

[*.md]
indent_style = space
trim_trailing_whitespace = false
max_line_length = 120


================================================
FILE: .gitattributes
================================================
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.gitmodules export-ignore
/.travis.yml export-ignore
/tests export-ignore


================================================
FILE: .github/FUNDING.yml
================================================
github: vrana
patreon: jakubvrana
custom: ["https://www.paypal.com/donate/?hosted_button_id=6PK5VNUCFT3FG"]


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Adminer version:** <!-- please use latest published or Git -->
**Compiled:** single file / single language / source codes / custom compilation
**Driver:** <!-- e.g. MySQLi -->
**Database version:** <!-- e.g. 10.2.12-MariaDB -->
**Plugins used:**

<!--
Please provide reproducible steps including a SQL dump (with no personal information) if applicable.
Also please include a screenshot.
Report issues with Adminer Docker image at https://github.com/TimWolla/docker-adminer._
-->


================================================
FILE: .github/workflows/ci.yml
================================================
name: CI

on:
  pull_request:
    branches: [ master ]
  workflow_dispatch:

jobs:
  build-test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3
      - uses: php-actions/composer@v6
      - uses: php-actions/phpcs@v1
        with:
          path: .
          standard: phpcs.xml
      - uses: php-actions/phpstan@v3


================================================
FILE: .gitignore
================================================
/adminer/adminer.css
/adminer/adminer-dark.css
/editor/adminer.css
/editor/adminer-dark.css
/adminer*.php
/editor*.php
/tests/pdo-*.html
/tests/screenshots/
/tests/cropped/
/vendor/
adminer-plugins/
adminer-plugins.php


================================================
FILE: .gitmodules
================================================
[submodule "jush"]
	path = externals/jush
	url = https://github.com/vrana/jush
[submodule "JsShrink"]
	path = externals/JsShrink
	url = https://github.com/vrana/JsShrink
[submodule "PhpShrink"]
	path = externals/PhpShrink
	url = https://github.com/vrana/PhpShrink


================================================
FILE: CHANGELOG.md
================================================
## Adminer dev
- Tables overview: allow sorting (bug #1231)
- Select: Disable Ctrl+click inline edit without UPDATE privilege
- Select: Display NULL in column title
- Export: Remember unchecked objects (regression from 5.0.6)
- Foreign key: Display new field in case of an error
- PostgreSQL: Order NULL last
- PostgreSQL: Display all SQL command warnings and only once
- PostgreSQL: Export serial as serial, not nextval()
- PostgreSQL: Export schema in nextval()
- PostgreSQL: Export schema in REFERENCES
- Editor: Display tinyint(1) as checkbox (bug #1246, regression from 5.4.2)
- Croatian translation

## Adminer 5.4.2 (released 2026-02-08)
- Avoid denial-of-service via version check (GHSA-q4f2-39gr-45jh, regression from 4.6.2)
- Pretty print JSON in edit
- Support multiline generated values in alter table
- Link //domain.tld values
- Improve print of nested tables
- Hide sort links on unsortable columns
- Display uneditable fields in edit form
- Shorten all but numeric and date types in select
- Fix escaping spaces in cookie value (bug #1208)
- Don't quote comma in TSV export (bug #1238)
- MariaDB: Don't display checks with the same name from another table (bug #1135)
- PostgreSQL: Offer foreign keys in create table
- PostgreSQL: Add missing parentheses to CHECK export
- PostgreSQL: Allow creating NOT DEFERRABLE foreign keys
- PostgreSQL: Remove duplicate DEFERRABLE in foreign key export
- PostgreSQL: Add schema to sequence and view export
- PostgreSQL: Fix definition of complex generated columns
- PostgreSQL: Mark unique partial indexes as unique (bug #1172)
- PostgreSQL: Fix namespace in inheritance links (bug #1221)
- non-PostgreSQL: Display NOT NULL checks (bug #1237)
- ClickHouse: Fix offset (bug #1188)
- ClickHouse: Fix list of tables (bug #1176)
- Plugins: Methods showVariables() and showStatus() (bug #1157)
- Plugins: Allow to be in any namespace
- New plugin: IGDB driver

## Adminer 5.4.1 (released 2025-09-26)
- SQL command: Unlink NULL primary keys
- Do not quote 0 in CSV export
- Warn about exceeded upload_max_filesize in imports
- Prolong queries saved from SQL command to URL (bug #1154)
- MySQL: Fix displaying routine definition (bug #1156, regression from 5.4.0)

## Adminer 5.4.0 (released 2025-09-08)
- Allow specifying operator in search anywhere
- Do not order descending in GROUP BY select
- Allow exporting SQL in SQL command (bug #1092)
- Add section links in database overview
- Warn about exceeded max_file_uploads in import
- Display @ after username without server in existing logins
- Display data length and index length for materialized views
- Link routines from syntax highlighting
- Autofocus added field in alter table
- Executed SQL commands: Add button for copy to clipboard
- Load more: run syntax highlighter
- Allow connecting to IPv6 (bug #1095)
- MySQL: Fix saving empty enum (bug #1152)
- MySQL 5.0-: Do not load partitioning info in alter table (bug #1099)
- MariaDB: Parse COLLATE in routine definition (bug #1104)
- PostgreSQL: Show structure of inherited tables
- PostgreSQL: Display index expressions
- PostgreSQL: Add SQL operator to select
- PostgreSQL: Hide only partitions, not all inherited tables from menu
- PostgreSQL: Allow comparing json columns (bug #1107)
- PostgreSQL: Shorten values in hstore columns
- PostgreSQL: Quote edit value with interval operator
- PostgreSQL: Fix calling functions with name-less parameters
- PostgreSQL: Fix calling functions returing table
- PostgreSQL: Don't treat user types containing 'file' as blobs (bug #1118)
- PostgreSQL: Export DROP and CREATE DATABASE (bug #1140)
- PostgreSQL 11-: Avoid duplicate oid in table status (bug #1089, regression from 5.3.0)
- Elasticsearch: Support dropping aliases
- Plugins: Methods afterConnect(), processList() and killProcess()
- New plugin: Display row numbers in select (bug #1106)
- New plugin: Specify query timeout

## Adminer 5.3.0 (released 2025-05-04)
- Align numeric functions right
- Autocomplete: Support table aliases
- Fix type error in Create function (bug #1053, regression from 5.1.1)
- Add border to column actions (bug #1072)
- Align money values right (bug #1071)
- MySQL: Avoid warning on selecting tables with fulltext indexes (bug #1036)
- MySQL, PostgreSQL: Support index algorithms (bug #1030)
- MySQL: Fix connecting to localhost:3306 (bug #1057, regression from 5.1.1)
- PostgreSQL, CockroachDB: Creating partitioned tables (bug #1031)
- PostgreSQL: Move partitioned tables from table list to parent table
- PostgreSQL: Support partial indices (bug #1048)
- PostgreSQL: Support calling functions returning table (bug #1040)
- PostgreSQL: Add NOT ILIKE operator (bug #1066)
- Editor: Fix bit and enum search (bug #1062)
- Designs: adminer.css with 'prefers-color-scheme: dark' doesn't disable dark mode
- Plugins: Method bodyClass() to add &lt;body class>
- Plugins: Allow setting dark mode in css()
- Hindi translation

## Adminer 5.2.1 (released 2025-04-11)
- Fix search anywhere (bug #1004, regression from 5.1.1)
- Fix import without primary key (bug #1017, regression from 5.1.1)
- PostgreSQL PDO: Fix bytea without primary key (bug #1021)
- non-MySQL: Parse '--' without trailing space as comment in SQL command (bug #1025, regression from 5.2.0)

## Adminer 5.2.0 (released 2025-04-08)
- Autocomplete SQL commands
- Do not edit NULL values by Modify (bug #967)
- Fix foreign key actions (regression from 5.1.1)
- MySQL: Display number of found rows in group queries (regression from 5.1.1)
- PostgreSQL: Support COPY FROM stdin in SQL query (bug #942)
- non-MySQL: Parse '--' without trailing space as comment in SQL command (bug SF-842)
- MS SQL: Limit one INSERT in export to 1000 rows (bug #983)
- CSS: Add logo
- Editor: Move mass sending e-mails to a plugin
- Plugins: Support translations by extending Adminer\Plugin
- New plugin: Configure options by end-users and store them to a cookie
- New plugin: Configure menu table links
- New plugin: Set up driver, server and database in Adminer Editor

## Adminer 5.1.1 (released 2025-04-02)
- Export: Fix tar (regression from 5.0.3)
- Select: Allow ordering by COUNT(*) (bug #966, regression from 5.0.2)
- Optimize retrieving columns for schema
- Elasticsearch: Make it work with Elasticsearch 8
- CSS: Hide menu on mobile
- CSS: Invert icons in dark mode
- Plugins: Allow changing CSP by more plugins
- New plugin: Use Monaco Editor for syntax highlighting
- New plugin: Use Prism for syntax highlighting

## Adminer 5.1.0 (released 2025-03-24)
- Display collation at table structure if different from table
- Ctrl+click in select moves the cursor in modern browsers
- URL parameter ?ext=pdo to force using PDO
- PDO: Handle PHP warnings for internal queries
- PostgreSQL: Display auto_increment of inserted rows
- PostgreSQL: Display description of system variables
- PostgreSQL: Avoid warning about crdb_version (bug #924, regression from 5.0.5)
- PostgreSQL 11: Support PROCEDURE
- SQLite PDO: Display results in SQL query
- MS SQL: Fix collation issues when retrieving default values
- MS SQL PDO: Display last insert ID
- CSS: Sticky table headers (bug #918)
- CSS: Allow more custom styles with dark mode (bug #925)
- CSS: Increase maximum width of string edit (bug #930)
- CSS: Increase space after SQL result (bug #937)
- Plugins: Autoload plugins from adminer-plugins/
- Plugins: Configure plugins with adminer-plugins.php
- Plugins: Display loaded plugins in server overview
- New plugin: AI prompt in SQL command generating the queries with Google Gemini
- New plugin: Verify new versions from GitHub
- New plugin: IMAP driver created for fun
- New plugin: Display links to tables referencing current row
- New plugin: Allow switching light and dark mode (bug #926)
- New plugin: Confirm before unloading page with changed form
- Uzbek translation

## Adminer 5.0.6 (released 2025-03-17)
- Align numbers right (bug #912)
- Display comment in title of field
- Remember export setting at SQL command
- Shorten queries saved from SQL command to URL (bug #917)
- SQL textarea: Open help on Ctrl+click
- Security: Disallow writing temporary files to symlinks (bug SF-855)
- MariaDB: Display MariaDB instead of MySQL
- CSS: Dark mode syntax highlighting
- CSS: Dark input fields in dark mode
- Designs named adminer-dark.css use dark basic style
- Plugins: Add method syntaxHighlighting()
- New plugin: Use Codemirror 5 for syntax highlighting and SQL with typeahead

## Adminer 5.0.5 (released 2025-03-13)
- MySQL: Display converting function for binary, bit or geometry fields
- MySQL: Display default values of binary columns
- MySQL: Allow setting default values of json column
- MariaDB: Don't display NULL as default value (regression from 5.0.0)
- PostgreSQL PDO: Escape bytea values (bug SF-218)
- CockroachDB: Display version
- CockroachDB: Recognize unique_rowid() as auto_increment
- MS SQL: Fix editing rows with datetime column in primary key
- MongoDB: Move to plugin
- CSS: Add dark theme

## Adminer 5.0.4 (released 2025-03-11)
- Compile: Fix shortening in private methods (regression from 5.0.3)

## Adminer 5.0.3 (released 2025-03-11)
- Fix gzip export (bug #896, regression from 5.0.0)
- Fix importing multiple SQL files not terminated by semicolon
- Use &lt;datalist> for altering collations
- MySQL: Allow setting default values of text column
- MySQL: Stop treating enum and set as numbers (bug SF-475)
- MySQL, MariaDB: Fix default values with ' (bug #895)
- MariaDB: Fix creating and altering generated columns (bug #897)
- PostgreSQL: Fix "where" and "order" privileges (bug #902, regression from 5.0.2)
- SQLite: Fix creating table in compiled version (bug #901, regression from 5.0.0)
- Elasticsearch: Do not pass null values on insert (PR #892)
- Elasticsearch: Fix displaying sparse rows (PR #893)
- Plugins: Add method dumpFooter()

## Adminer 5.0.2 (released 2025-03-10)
- PostgreSQL: Fix setting NULL and original value on enum (bug SF-884)
- CockroachDB: Add support via PostgreSQL driver
- Elasticsearch: Add support for "where" and "order" field privilege

## Adminer 5.0.1 (released 2025-03-07)
- Fix bulk operations with tables (regression from 5.0.0)
- Remove duplicate columns from select (bug SF-670)
- MariaDB: Fix link to status variable doc (bug SF-658)
- PostgreSQL: Support indexes on materialized views (PR #467)
- Elasticsearch: Drop support for version &lt; 7

## Adminer 5.0.0 (released 2025-03-07)
- Speed up with disabled output buffering
- Allow creating generated columns (bug SF-857)
- Don't autofocus computed fields in insert form
- Skip generated columns in multi-edit (bug SF-882)
- MySQL: Display generated value in table structure
- MySQL: Drop support for MySQL 4
- PostgreSQL: Compute size of all databases (bug SF-881)
- PostgreSQL: Do not alter indexes with expressions
- PostgreSQL: Fix export of indexes with expressions (bug SF-768)
- PostgreSQL: Display ENUM types
- PostgreSQL: Export ENUM types (bug SF-587)
- PostgreSQL: Display ? instead of -1 rows in table overview (bug SF-883)
- PostgreSQL: Show accessible databases to non-owners (regression from 4.9.1)
- PostgreSQL: Skip editing generated columns
- PostgreSQL, MS SQL, Oracle: Hide table actions for information_schema
- SQLite: Support CHECK constraint
- SQLite: Support generated columns
- SQLite: Add command Check tables
- SQLite: Display all rows of variable values
- SQLite: Remove support for SQLite version 2
- MS SQL: Support export (bug SF-480)
- MS SQL: Display foreign keys ON UPDATE and ON DELETE
- MS SQL: Support computed columns
- MS SQL: Fix CSV import (bug SF-859)
- MS SQL: Fix altering foreign key
- MS SQL PDO: Support offset
- MS SQL: Remove support for MSSQL extension
- MS SQL: Add support for PDO_SQLSRV extension
- MS SQL: Link help from sys tables
- MS SQL: Fix highlighting columns as primary keys
- MongoDB: Remove support for deprecated extension mongo
- Elasticsearch: Fix text search on boolean fields
- Plugins: Adminer code is now in a namespace

## Adminer 4.17.1 (released 2025-02-25)
- MySQL: Fix typo in the date type (regression from 4.17.0)

## Adminer 4.17.0 (released 2025-02-24)
- Hide index column options by default
- Offer original values in multi-row editing (regression from 4.16.0)
- Print SQL errors as comments in export (regression from 3.2.0)
- MySQL, PostgreSQL, MS SQL: Support CHECK constraint
- MySQL: Show comments at routine call (bug SF-874)
- MySQL: Don't offer empty enum value in edit
- MySQL 9+: Support vector type
- PostgreSQL: Link user defined types
- PostgreSQL: Constraint enum values in editing (bug SF-270)
- PostgreSQL: Export functions
- PostgreSQL 8+: Fix exporting table constraints
- SQLite: Show all supported pragmas in Variables
- MS SQL: Allow altering table in non-default schema (bug SF-405)
- MS SQL: Fix default values (bug SF-732, bug SF-733)
- MS SQL: Fix length of nvarchar columns
- Editor PDO: Select value of foreign key in edit (bug SF-847)
- Mobile devices: Use device width

## Adminer 4.16.0 (released 2025-02-20)
- MySQL: Fix saving bit(64) values (bug SF-839)
- PostgreSQL: Preserve whitespace in EXPLAIN (bug SF-827)
- PostgreSQL: Support SSL
- PostgreSQL: Support altering auto_increment (bug SF-761)
- SQLite: Fix altering forign keys (bug SF-841)
- SQLite: Fix expressions in default values (bug SF-860)
- MS SQL: Foreign keys in non-default schema (bug SF-833)
- Oracle: Include tables granted by other user
- Elasticsearch: Move to plugin
- MongoDB: Execute commands against the selected DB

## Adminer 4.15.0
- Escape unknown field in select
- HTTP drivers: Don't allow path in server name
- HTTP drivers: Hide connection error message
- SimpleDB: Disable XML entity loader
- Latvian translation

## Adminer 4.14.0
- Use autofocus HTML attribute
- PostgreSQL: Fix initial value of exported autoincrement
- PostgreSQL: Fix renaming a database

## Adminer 4.12.0
- Fix SQL query code direction if RTL language is used
- MariaDB: Add support for UUID data type
- MS SQL, MongoDB: Connect to localhost with default port if server is not specified
- MongoDB: Fix parsing WHERE condition from SQL query

## Adminer 4.11.0
- MySQL: Fix highlighting current table in menu on macOS
- MariaDB: Fix several links to documentation pages
- MS SQL: Prefix Unicode strings with 'N' so they are treated correctly

## Adminer 4.10.0
- Print username next to the logout button
- Do not display empty action links in main menu

## Adminer 4.9.4
- Unify displaying of 'New item' action based on privileges
- Firefox: Fix opening a database to the new browser's tab with Ctrl+click
- Editor: Fix array conversion to string (issue adminerneo#3).
- Editor: Fix building links with array parameters

## Adminer 4.9.3
- MySQL, PostgreSQL: Fix queries splitting and string constants
- MySQL: Fix where clause for JSON column
- MySQL: Do not include unchanged PARTITION BY definition into ALTER TABLE query
- MariaDB: Support current_timestamp()
- PostgreSQL: Fix editing record that contains a field with GENERATED ALWAYS default value

## Adminer 4.9.2
- PostgreSQL: Fix search fields configuration (regression from 4.9.0)
- PostgreSQL: Fix exporting CREATE TABLE query with GENERATED default values
- PostgreSQL: Fix exporting CREATE TABLE with sequence default value
- PostgreSQL: Fix search condition for network address types, add macaddr8 type

## Adminer 4.9.1
- Support PHP 8.3
- PostgreSQL: Show only accessible databases

## Adminer 4.9.0
- Validate connection to server in HTTP based drivers
- Elasticsearch 5: Make unusable driver usable again, move it to plugins
- Add new Elasticsearch 7 driver
- MySQL: Skip dump of generated columns

## Adminer 4.8.2
- Support multi-line table comments
- MySQL: Use ST_SRID() instead of SRID() for MySQL 8 (PR #418)
- PostgreSQL: Don't reset table comments (regression from 4.2.0)
- PostgreSQL PDO: Allow editing rows identified by boolean column (PR #380)

## Adminer 4.8.1 (released 2021-05-14)
- Internet Explorer or PDO in Adminer 4.7.8-4.8.0: Fix XSS in doc_link (bug SF-797)
- Fix more PHP 8 warnings (bug SF-781)
- Avoid PHP warnings with PDO drivers (bug SF-786, regression from 4.7.8)
- MySQL: Allow moving views to other DB and renaming DB with views (bug SF-783)
- MariaDB: Do not treat sequences as views (PR #416)
- PostgreSQL: Support UPDATE OF triggers (bug SF-789)
- PostgreSQL: Support triggers with more events (OR)
- PostgreSQL: Fix parsing of foreign keys with non-ASCII column names
- PostgreSQL &lt; 10 PDO: Avoid displaying GENERATED ALWAYS BY IDENTITY everywhere (bug SF-785, regression from 4.7.9)
- SQLite: Fix displayed types (bug SF-784, regression from 4.8.0)

## Adminer 4.8.0 (released 2021-02-10)
- Support function default values in insert (bug SF-713)
- Allow SQL pseudo-function in insert
- Skip date columns for non-date values in search anywhere
- Add DB version to comment in export
- Support PHP 8 in create table (regression from 4.7.9)
- MySQL 8: Fix EXPLAIN in SQL command
- PostgreSQL: Create PRIMARY KEY for auto increment columns
- PostgreSQL: Avoid exporting empty sequence last value (bug SF-768)
- PostgreSQL: Do not show triggers from other schemas (PR #412)
- PostgreSQL: Fix multi-parameter functions in default values (bug SF-736)
- PostgreSQL: Fix displaying NULL bytea fields
- PostgreSQL PDO: Do not select NULL function for false values in edit
- Oracle: Alter indexes
- Oracle: Count tables
- Oracle: Import from CSV
- Oracle: Fix column size with string type
- MongoDB: Handle errors
- SimpleDB, Firebird, ClickHouse: Move to plugin

## Adminer 4.7.9 (released 2021-02-07)
- Fix XSS in browsers which don't encode URL parameters (bug SF-775, regression from 4.7.0)
- Elasticsearch, ClickHouse: Do not print response if HTTP code is not 200
- Don't syntax highlight during IME composition (bug SF-747)
- Quote values with leading and trailing zeroes in CSV export (bug SF-777)
- Link URLs in SQL command (PR #411)
- Fix displayed foreign key columns from other DB (bug SF-766)
- Re-enable PHP warnings (regression from 4.7.8)
- MySQL: Do not export names in quotes with sql_mode='ANSI_QUOTES' (bug SF-749)
- MySQL: Avoid error in PHP 8 when connecting to socket (PR #409)
- MySQL: Don't quote default value of text fields (bug SF-779)
- PostgreSQL: Export all FKs after all CREATE TABLE (PR #351)
- PostgreSQL: Fix dollar-quoted syntax highlighting (bug SF-738)
- PostgreSQL: Do not show view definition from other schema (PR #392)
- PostgreSQL: Use bigserial for bigint auto increment (bug SF-765, regression from 3.0.0)
- PostgreSQL PDO: Support PgBouncer, unsupport PostgreSQL &lt; 9.1 (bug SF-771)
- PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386)
- PostgreSQL 10: Support partitioned tables (PR #396)
- PostgreSQL 11: Create PRIMARY KEY for auto increment columns
- SQLite: Set busy_timeout to 500
- MS SQL: Don't truncate comments to 30 chars (PR #376)
- Elasticsearch 6: Fix displaying type mapping (PR #402)
- MongoDB: Fix password-less check in the mongo extension (PR #405)
- Editor: Cast to string when searching (bug SF-325)
- Editor: Avoid trailing dot in export filename

## Adminer 4.7.8 (released 2020-12-06)
- Support PHP 8
- Disallow connecting to privileged ports (bug SF-769)

## Adminer 4.7.7 (released 2020-05-11)
- Fix open redirect if Adminer is accessible at //adminer.php%2F@

## Adminer 4.7.6 (released 2020-01-31)
- Speed up alter table form (regression from 4.4.0)
- Fix clicking on non-input fields in alter table (regression from 4.6.2)
- Display time of procedure execution
- Disallow connecting to ports > 65535 (bug SF-730)
- MySQL: Always set foreign_key_checks in export
- PostgreSQL: Support exporting views
- Editor: Fix focusing foreign key search in select

## Adminer 4.7.5 (released 2019-11-13)
- Add id="" to cells with failed inline edit (bug SF-708)
- PostgreSQL: Fix getting default value in PostgreSQL 12 (bug SF-719)
- PostgreSQL, Oracle: Set schema for EXPLAIN queries in SQL command (bug SF-706)
- ClickHouse: SQL command
- Swedish translation

## Adminer 4.7.4 (released 2019-10-22)
- Fix XSS if Adminer is accessible at URL /data:

## Adminer 4.7.3 (released 2019-08-27)
- Allow editing foreign keys pointing to tables in other database/schema (bug SF-694)
- Fix blocking of concurrent instances in PHP >7.2 (bug SF-703)
- MySQL: Speed up displaying tables in large databases (bug SF-700, regression from 4.7.2)
- MySQL: Allow editing rows identified by negative floats (bug SF-695)
- MySQL: Skip editing generated columns
- SQLite: Quote strings stored in integer columns in export (bug SF-696)
- SQLite: Handle error in altering table (bug SF-697)
- SQLite: Allow setting auto increment for empty tables
- SQLite: Preserve auto increment when recreating table
- MS SQL: Support foreign keys to other DB
- MongoDB: Allow setting authSource from environment variable

## Adminer 4.7.2 (released 2019-07-18)
- Do not attempt logging in without password (bug SF-676)
- Stretch footer over the whole table width (bug SF-624)
- Allow overwriting tables when copying them
- Fix displaying SQL command after Save and continue edit
- Cache busting for adminer.css
- MySQL: Fix displaying multi-columns foreign keys (bug SF-675, regression from 4.7.0)
- MySQL: Fix creating users and changing password in MySQL 8 (bug SF-663)
- MySQL: Pass SRID to GeomFromText
- PostgreSQL: Fix setting column comments on new table
- PostgreSQL: Display definitions of materialized views (bug SF-682)
- PostgreSQL: Fix table status in PostgreSQL 12 (bug SF-683)
- MS SQL: Support comments
- Elasticsearch: Fix setting number of rows

## Adminer 4.7.1 (released 2019-01-24)
- Display the tables scrollbar (bug SF-647)
- Remember visible columns in Create Table form (bug SF-493)
- Add autocomplete attributes to login form
- PHP &lt;5.4 compatibility even with ClickHouse enabled (regression from 4.7.0)
- SQLite: Hide server field in login form
- Editor: Allow disabling boolean fields in PostgreSQL (bug SF-640)

## Adminer 4.7.0 (released 2018-11-24)
- Simplify storing executed SQL queries to bookmarks
- Warn when using password with leading or trailing spaces
- Hide import from server if importServerPath() returns an empty string
- Fix inline editing of empty cells (regression from 4.6.3)
- Allow adding more than two indexes and forign key columns at a time (regression from 4.4.0)
- Avoid overwriting existing tables when copying tables (bug SF-642)
- Fix function change with set data type
- Increase username maxlength to 80 (bug SF-623)
- Make maxlength in all fields a soft limit
- Make tables horizontally scrollable
- MySQL: Support foreign keys created with ANSI quotes (bug SF-620)
- MySQL: Recognize ON UPDATE current_timestamp() (bug SF-632, bug SF-638)
- MySQL: Descending indexes in MySQL 8 (bug SF-643)
- PostgreSQL: Quote array values in export (bug SF-621)
- PostgreSQL: Export DESC indexes (bug SF-639)
- PostgreSQL: Support GENERATED BY DEFAULT AS IDENTITY in PostgreSQL 10
- MS SQL: Pass database when connecting
- ClickHouse: Connect, databases list, tables list, select, SQL command
- Georgian translation

## Adminer 4.6.3 (released 2018-06-28)
- Disallow using password-less databases
- Copy triggers when copying table
- Stop session before connecting
- Simplify running slow queries
- Decrease timeout for running slow queries from 5 seconds to 2 seconds
- Fix displaying info about non-alphabetical objects (bug SF-599)
- Use secure cookies on HTTP if session.cookie_secure is set
- PDO: Support binary fields download
- MySQL: Disallow LOAD DATA LOCAL INFILE
- MySQL: Use CONVERT() only when searching for non-ASCII (bug SF-603)
- MySQL: Order database names in MySQL 8 (bug SF-613)
- PostgreSQL: Fix editing data in views (bug SF-605, regression from 4.6.0)
- PostgreSQL: Do not cast date/time/number/uuid searches to text (bug SF-608)
- PostgreSQL: Export false as 0 in PDO (bug SF-619)
- MS SQL: Support port with sqlsrv
- Editor: Do not check boolean checkboxes with false in PostgreSQL (bug SF-607)

## Adminer 4.6.2 (released 2018-02-20)
- Semi-transparent border on table actions
- Shorten JSON values in select (bug SF-594)
- Speed up alter table form (regression from 4.4.0)
- Store current version without authentication and in Editor
- PostgreSQL: Fix exporting string default values
- PostgreSQL: Fix exporting sequences in PostgreSQL 10
- PostgreSQL: Add IF EXISTS to DROP SEQUENCE in export (bug SF-595)
- Editor: Fix displaying of true boolean values (regression from 4.5.0)

## Adminer 4.6.1 (released 2018-02-09)
- Sticky position of table actions
- Speed up rendering of long tables (regression from 4.4.0)
- Display notification about performing action after relogin
- Add system tables help links
- MySQL: Support non-utf8 charset in search in column
- MySQL: Support geometry in MySQL 8 (bug SF-574)
- MariaDB: Links to documentation
- SQLite: Allow deleting PRIMARY KEY from tables with auto increment
- PostgreSQL: Support binary files in bytea fields
- PostgreSQL: Don't treat interval type as number (bug SF-474)
- PostgreSQL: Cast to string when searching using LIKE (bug SF-325)
- PostgreSQL: Fix condition for selecting no rows
- PostgreSQL: Support TRUNCATE+INSERT export
- Customization: Support connecting to MySQL via SSL
- Customization: Allow specifying server name displayed in breadcrumbs

## Adminer 4.6.0 (released 2018-02-05)
- Fix counting selected rows after going back to select page
- PHP &lt;5.3 compatibility even with Elasticsearch enabled
- Fully support functions in default values
- Stop redirecting links via adminer.org
- Support X-Forwarded-Prefix
- Display options for timestamp columns when creating a new table
- Disable autocompleting password on create user page
- Use primary key to edit rows even if not selected
- MySQL, PostgreSQL: Display warnings
- MySQL: Add floor and ceil select functions
- MySQL: Add FIND_IN_SET search operator
- MariaDB: Support JSON since MariaDB 10.2
- SQLite, PostgreSQL: Limit rows in data manipulation without unique key
- PostgreSQL: Support routines
- PostgreSQL: Allow editing views with uppercase letters (bug SF-467)
- PostgreSQL: Allow now() as default value (bug SF-525)
- SimpleDB: Document that allow_url_fopen is required
- Malay translation

## Adminer 4.5.0 (released 2018-01-24)
- Display name of the object in confirmation when dropping it
- Display newlines in column comments (bug SF-573)
- Support current_timestamp() as default of time fields (bug SF-572)
- Hide window.opener from pages opened in a new window (bug SF-561)
- Display error when getting row to edit
- Store current Adminer version server-side to avoid excessive requests
- Adminer: Fix Search data in tables (regression from 4.4.0)
- CSP: Allow any styles, images, media and fonts, disallow base-uri
- MySQL: Support geometry in MySQL 8 (bug SF-574)
- MySQL: Support routines with comments in parameters (bug SF-460)
- MariaDB: Support fulltext and spatial indexes in InnoDB (bug SF-583)
- SQLite: Enable foreign key checks
- PostgreSQL: Respect NULL default value
- PostgreSQL: Display foreign tables (bug SF-576)
- PostgreSQL: Do not export triggers if not requested
- PostgreSQL: Export DROP SEQUENCE if dropping table
- PostgreSQL: Display boolean values as code (bug SF-562)
- MS SQL: Support freetds
- non-MySQL: Avoid CONVERT() (bug SF-509)
- Elasticsearch: Insert, update, delete
- MongoDB: Support mongodb PHP extension
- Editor: Fix displaying of false values in PostgreSQL (bug SF-568)

## Adminer 4.4.0 (released 2018-01-17)
- Add Content Security Policy
- Disallow scripts without nonce
- Rate limit password-less login attempts from the same IP address
- Disallow connecting to privileged ports
- Add nosniff header
- PHP 7.1: Prevent warning when using empty limit
- PHP 7.2: Prevent warning when searching in select
- MySQL: Remove dedicated view for replication status (added in 4.3.0)
- PostgreSQL: Sort table names (regression from 4.3.1)
- Editor: Don't set time zone from PHP, fixes DST
- Editor: Display field comment's text inside [] only in edit form
- Editor: Fix doubleclick on database page
- Editor: Fix Search data in tables
- Customization: Always send security headers
- Hebrew translation

## Adminer 4.3.1 (released 2017-04-14)
- Fix permanent login after logout (bug SF-539)
- Fix SQL command autofocus (regression from 4.0.0)
- PostgreSQL: Support JSON and JSONB data types
- PostgreSQL: Fix index size computation in PostgreSQL &lt; 9.0 (regression from 4.3.0)
- PostgreSQL: Fix nullable fields in export

## Adminer 4.3.0 (released 2017-03-15)
- Make maxlength in edit fields a soft limit
- Add accessibility labels
- Add Cache-Control: immutable to static files
- MySQL: Support MySQL 8
- MySQL: Support JSON data type
- MySQL: Add dedicated view for replication status
- MySQL: Support spatial indexes
- PostgreSQL: Export
- PostgreSQL: Don't treat partial indexes as unique
- MS SQL: Support pdo_dblib
- Elasticsearch: Support HTTPS by inputting https://server

## Adminer 4.2.5 (released 2016-06-01)
- Fix remote execution in SQLite query
- SQLite: Require credentials to use
- PostgreSQL: Support KILL

## Adminer 4.2.4 (released 2016-02-06)
- Fix remote execution in SQLite query
- MySQL: Support PHP 7
- Bosnian translation
- Finnish translation

## Adminer 4.2.3 (released 2015-11-15)
- Fix XSS in indexes (non-MySQL only)
- Support PHP 7
- Greek translation
- Galician translation
- Bulgarian translation

## Adminer 4.2.2 (released 2015-08-05)
- Fix XSS in alter table (found by HP Fortify)

## Adminer 4.2.1 (released 2015-03-10)
- Send referrer header to the same domain
- MySQL: Fix usage of utf8mb4 if the client library doesn't support it
- MySQL: Use utf8mb4 in export only if required
- SQLite: Use EXPLAIN QUERY PLAN in SQL query

## Adminer 4.2.0 (released 2015-02-07)
- Fix XSS in login form (bug SF-436)
- Allow limiting number of displayed rows in SQL command
- Fix reading routine column collations
- Unlock session in alter database
- Make master key unreadable to others (bug SF-410)
- Fix edit by long non-utf8 string
- Specify encoding for PHP 5.6 with invalid default_charset
- Fix saving NULL value, bug since Adminer 4.0.3
- Send 403 for auth error
- Report offline and other AJAX errors (bug SF-419)
- Don't alter table comment if not changed
- Add links to documentation on table status page
- Fix handling of 64 bit numbers in auto_increment
- Add referrer: never meta tag
- MySQL: Use utf8mb4 if available
- MySQL: Support foreign keys in NDB storage
- PostgreSQL: Materialized views
- SQLite: Support CURRENT_* default values (bug SF-417)
- Elasticsearch: Use where in select
- Firebird: Alpha version
- Danish translation

## Adminer 4.1.0 (released 2014-04-18)
- Provide size of all databases in the overview
- Prevent against brute force login attempts from the same IP address
- Compute number of tables in the overview explicitly
- Display edit form after error in clone or multi-edit
- Trim trailing non-breaking spaces in SQL textarea
- Display time of the select command
- Print elapsed time in HTML instead of SQL command comment
- Improve gzip export ratio (bug SF-387)
- Use rel="noreferrer" for external links, skip adminer.org redirect in WebKit
- MySQL: Fix enum types in routines (bug SF-391)
- MySQL: Fix editing rows by binary values, bug since Adminer 3.7.1
- MySQL: Respect daylight saving time in dump, bug since Adminer 3.6.4
- MySQL 5.6.5+: Support ON UPDATE on datatime column
- SQLite: Support UPDATE OF triggers
- SQLite: Display auto-created unique indexes, bug since Adminer 3.5.0
- Editor: Fix login() method, bug since Adminer 4.0.0
- Translate numbers in ar, bn, fa
- Vietnamese translation

## Adminer 4.0.3 (released 2014-02-01)
- MongoDB: insert, truncate, indexes
- SimpleDB, MongoDB: insert more fields at once
- SQLite: Fix creating table and altering primary key, bug since Adminer 4.0.0
- Don't store invalid credentials to session, bug since Adminer 4.0.0
- Norweigan translation

## Adminer 4.0.2 (released 2014-01-11)
- Fix handling of long text in SQL textarea
- Support paste to SQL textarea in Opera

## Adminer 4.0.1 (released 2014-01-11)
- Don't use type=number if a SQL function is used
- Disable highlighting in textareas with long texts
- Don't autofocus SQL textarea in Firefox
- Don't link NULL foreign key values
- Fix displaying images in Editor, bug since Adminer 3.6.0
- Fix uploading files, bug since Adminer 4.0.0
- MongoDB: Count tables, display ObjectIds, sort, limit, offset, count rows
- Elasticsearch: Fix compiled version, create and drop DB, drop table

## Adminer 4.0.0 (released 2014-01-08)
- Driver for SimpleDB, MongoDB and Elasticsearch
- Highlight SQL in textareas
- Save and continue edit by AJAX
- Split SQL command and import
- Add a new column in alter table on key press
- Mark length as required for strings
- Add label to database selection, move logout button
- Add button for dropping an index
- Display number of selected rows
- Add links to documentation
- Disable underlining links
- Differentiate views in navigation
- Improve speed of CSV import
- Keep form values after refresh in Firefox
- Mark auto_increment fields in edit
- Don't append newlines to uploaded files, bug since Adminer 3.7.0
- Don't display SQL edit form on Ctrl+click on the select query, introduced in Adminer 3.6.4
- Use MD5 for editing long keys only in supported drivers, bug since Adminer 3.6.4
- Don't reset column when searching for an empty value with Enter, bug since Adminer 3.6.4
- Encrypt passwords stored in session by a key stored in cookie
- Don't execute external JavaScript when verifying version
- Include JUSH in the compiled version
- Protect CSRF token against BREACH
- Non-MySQL: View triggers
- SQLite: Allow editing primary key
- SQLite: Allow editing foreign keys
- PostgreSQL: Fix handling of nextval() default values
- PostgreSQL: Support creating array columns
- Customization: Provide schemas()
- Portugal Portuguese translation
- Thai translation

## Adminer 3.7.1 (released 2013-06-29)
- Increase click target for checkboxes
- Use shadow for highlighting default button
- Don't use LIMIT 1 if inline updating unique row
- Don't check previous checkbox on added column in create table (bug SF-326)
- Order table list by name
- Verify UTF-8 encoding of CSV import
- Notify user about expired master password for permanent login
- Highlight table being altered in navigation
- Send 404 for invalid database and schema
- Fix title and links on invalid table pages
- Display error on invalid alter table and view pages
- MySQL: Speed up updating rows without numeric or UTF-8 primary key
- Non-MySQL: Descending indexes
- PostgreSQL: Fix detecting oid column in PDO
- PostgreSQL: Handle timestamp types (bug SF-324)
- Korean translation

## Adminer 3.7.0 (released 2013-05-19)
- Allow more SQL files to be uploaded at the same time
- Print run time next to executed queries
- Don't drop original view and routine before creating the new one
- Highlight default submit button
- Add server placeholder to login form
- Disable SQL export when applying functions in select
- Allow using lang() in plugins (customization)
- Remove bzip2 compression support
- Constraint memory used in TAR export
- Allow exporting views dependent on each other (bug SF-214)
- Fix resetting search (bug SF-318)
- Don't use LIMIT 1 if updating unique row (bug SF-320)
- Restrict editing rows without unique identifier to search results
- Display navigation below main content on mobile browsers
- Get number of rows on export page asynchronously
- Respect 'whole result' even if some rows are checked (bug SF-339 since Adminer 3.7.0)
- MySQL: Optimize create table page and Editor navigation
- MySQL: Display bit type as binary number
- MySQL: Improve export of binary data types
- MySQL: Fix handling of POINT data type (bug SF-282)
- MySQL: Don't export binary and geometry columns twice in select
- MySQL: Fix EXPLAIN in MySQL &lt; 5.1, bug since Adminer 3.6.4
- SQLite: Export views
- PostgreSQL: Fix swapped NULL and NOT NULL columns in PDO

## Adminer 3.6.4 (released 2013-04-26)
- Display pagination on a fixed position
- Increase default select limit to 50
- Display SQL edit form on Ctrl+click on the select query
- Display SQL history from newest
- Recover original view, trigger, routine if creating fails
- Do not store plain text password to history in creating user
- Selectable ON UPDATE CURRENT_TIMESTAMP field in create table
- Open database to a new window after selecting it with Ctrl
- Clear column name after resetting search (bug SF-296)
- Explain partitions in SQL query (bug SF-294)
- Allow loading more data with inline edit (bug SF-299)
- Stay on the same page after deleting rows (bug SF-301)
- Respect checked tables in export filename (bug SF-133)
- Respect PHP configuration max_input_vars
- Fix unsetting permanent login after logout
- Disable autocapitalize in identifiers on mobile browsers
- MySQL: Compatibility with MySQL 5.6
- MySQL: Move ALTER export to plugin
- MySQL: Use numeric time zone in export
- MySQL: Link processlist documentation
- SQLite: Export indexes

## Adminer 3.6.3 (released 2013-01-23)
- Display error code in SQL query
- Allow specifying external links
- Treat Meta key same as Ctrl
- Fix XSS in displaying non-UTF-8 strings
- Don't use type="number" for decimal numbers

## Adminer 3.6.2 (released 2012-12-21)
- Edit values by Ctrl+click instead of double click
- Don't select row on double click
- Support NULL in routine calls
- Shorten printed values in varchar fields
- Display table default values on wide screens
- Display date in SQL history
- HTML5 input fields
- Display warning for missing UPDATE privilege
- Fix switching language on first load
- Support enabled mbstring.func_overload
- MySQL: Prolong comment length since MySQL 5.5
- PostgreSQL: Fix process list in version 9.2
- MS SQL: Support databases starting with number

## Adminer 3.6.1 (released 2012-09-17)
- Fix compiled version on PHP with multibyte support

## Adminer 3.6.0 (released 2012-09-16)
- Load more data in select
- Edit strings with \n in textarea
- Time out long running database list and select count
- Use VALUES() in INSERT+UPDATE export
- Style logout button as link
- Store selected database to permanent login
- Ctrl+click and Shift+click on button opens form to a blank window
- Switch language by POST
- Compress translations
- MySQL: Support geometry data types
- selectQueryBuild() method (customization)
- Serbian translation

## Adminer 3.5.1 (released 2012-08-10)
- Support same name fields in CSV export
- Support Shift+click in export

## Adminer 3.5.0 (released 2012-08-05)
- Links for column search in select
- Autohide column context menu in select
- Autodisplay long table names in tables list
- Display assigned auto_increment after clone
- SQLite: Full alter table
- SQLite: Better editing in tables without primary key
- SQLite: Display number of rows in database overview

## Adminer 3.4.0 (released 2012-06-30)
- Link to descending order
- Shift+click on checkbox to select consecutive rows
- Print current time next to executed SQL queries
- Warn about selecting data without index
- Allow specifying database in login form
- Link to original table in EXPLAIN of SELECT * FROM table t
- Format numbers in translations
- MySQL: inform about disabled event_scheduler
- SQLite: support binary data
- PostgreSQL: approximate row count in table overview
- PostgreSQL: improve PDO support in SQL command
- Oracle: schema, processlist, table overview numbers
- Simplify work with NULL values (customization)
- Use namespace in login form (customization)
- Customizable export filename (customization)
- Replace JSMin by better JavaScript minifier
- Don't use AJAX links and forms
- Indonesian translation
- Ukrainian translation
- Bengali translation

## Adminer 3.3.4 (released 2012-03-07)
- Foreign keys default actions (bug SF-188)
- SET DEFAULT foreign key action
- Fix minor parser bug in SQL command with webserver file
- Ctrl+click on button opens form to a blank window
- Trim table and column names (bug SF-195)
- Error message with no response from server in AJAX
- Esc to cancel AJAX request
- Move AJAX loading indicator to the right
- Don't quote bit type in export
- Don't check row while selecting text
- Fix invalid references line position on Database schema
- Disable selecting text on Database schema
- Ability to disable export (customization)
- Extensible list of databases (customization)
- MySQL: set autocommit after connect
- SQLite, PostgreSQL: vacuum
- SQLite, PostgreSQL: don't use LIKE for numbers (bug SF-202)
- PostgreSQL: fix alter foreign key
- PostgreSQL over PDO: connect if the eponymous database does not exist (bug SF-185)
- Boolean search (Editor)
- Persian translation

## Adminer 3.3.3 (released 2011-08-12)
- Highlight checked rows
- Titles of links in database overview and navigation
- Fix trigger export (SQLite)
- Default trigger statement (SQLite, PostgreSQL)
- Remove search by expression (PostgreSQL, MS SQL)

## Adminer 3.3.2 (released 2011-08-08)
- Display error with non-existent row in edit
- Fix minor parser bug in SQL command with webserver file
- Fix SQL command Stop on error
- Don't scroll with AJAX select order and alter move column
- Fast number of rows with big tables (PostgreSQL)
- Sort databases and schemas (PostgreSQL)

## Adminer 3.3.1 (released 2011-07-27)
- Fix XSS introduced in Adminer 3.2.0
- Fix altering default values (PostgreSQL)
- Process list (PostgreSQL)

## Adminer 3.3.0 (released 2011-07-19)
- Use Esc to disable in-place edit
- Shortcut for database privileges
- Editable index names
- Append new index with auto index selection (bug SF-138)
- Preserve original timestamp value in multiple update (bug SF-158)
- Bit type default value
- Display foreign key name in tooltip
- Display default column value in table overview
- Display column collation in tooltip
- Keyboard shortcuts: Alt+Shift+1 for homepage, Ctrl+Shift+Enter for Save and continue edit
- Show only errors with Webserver file SQL command
- Remember select export and import options
- Link tables and indexes from SQL command EXPLAIN (MySQL)
- Display error with all wrong SQL commands (MySQL)
- Display foreign keys from other schemas (PostgreSQL)
- Pagination support (Oracle)
- Autocomplete for big foreign keys (Editor)
- Display name of the referenced record in PostgreSQL (Editor)
- Prefer NULL to empty string (Editor, bug SF-162)
- Display searched columns (Editor)
- Customizable favicon (customization)
- Method name can return a link (customization)
- Easier sending of default headers (customization)
- Lithuanian and Romanian translation

## Adminer 3.2.2 (released 2011-03-28)
- Fix AJAX history after reload

## Adminer 3.2.1 (released 2011-03-23)
- Ability to save expression in edit
- Respect default database collation (bug SF-119)
- Don't export triggers without table (bug SF-123)
- Esc to focus next field in Tab textarea
- Send forms by Ctrl+Enter on &lt;select>
- Enum editor and textarea Ctrl+Enter working in IE
- AJAX forms in Google Chrome
- Parse UTF-16 and UTF-8 BOM in all text uploads
- Display ; in history
- Use DELIMITER in history
- Show databases even with skip_show_database in MySQL 5
- Disable maxlength with functions in edit
- Better placement of AJAX icon
- Table header in CSV export (Editor)
- Time format hint (Editor)
- Respect order after search (Editor)
- Set MySQL time zone by PHP setting (Editor)
- Allow own code in &lt;head> (customization)
- Polish translation

## Adminer 3.2.0 (released 2011-02-24)
- Get long texts and slow information by AJAX
- Most links and forms by AJAX in browsers with support for history.pushState
- Copy tables
- Ability to search by expression in select
- Export SQL command result (bug SF-99)
- Focus first field with insert (bug SF-106)
- Permanent link in schema
- Display total time in show only errors mode in SQL command
- History: edit all
- MS SQL: auto primary and foreign key
- SQLite: display 0
- Create table default data type: int
- Focus upper/lower fields by Ctrl+Up/Ctrl+Down
- Hide credentials for SQLite
- Utilize oids in PostgreSQL
- Homepage customization
- Use IN for search in numeric fields (Editor)
- Use password input for _md5 and _sha1 fields (Editor)
- Work without session.use_cookies (bug SF-107)
- Fix saving schema to cookie in Opera
- Portuguese, Slovenian and Turkish translation

## Adminer 3.1.0 (released 2010-11-16)
- TSV export and import
- Customizable export
- Option to show only errors in SQL command
- Link to bookmark SQL command
- Recognize $$ strings in SQL command (PostgreSQL)
- Highlight and edit SQL command in processlist
- Always display all drivers
- Timestamp at the end of export
- Link to refresh database cache (bug SF-96)
- Support for virtual foreign keys
- Disable XSS "protection" of IE8
- Immunity against zend.ze1_compatibility_mode (bug SF-86)
- Fix last page with empty result set
- Arabic translation and RTL support
- Dual licensing: Apache or GPL

## Adminer 3.0.1 (released 2010-10-18)
- Send the form by Ctrl+Enter in all textareas
- Disable creating SQLite databases with extension other than db, sdb, sqlite
- Ability to use Adminer in a frame through customization
- Catalan translation
- MS SQL 2005 compatibility
- PostgreSQL: connect if the eponymous database does not exist

## Adminer 3.0.0 (released 2010-10-15)
- Drivers for MS SQL, SQLite, PostgreSQL, Oracle
- Allow concurrent logins on the same server
- Allow permanent login without customization
- In-place editation in select
- Foreign key options in Table creation
- Treat binary type as hex
- Show number of tables in server overview
- Operator LIKE %%
- Remember export parameters in cookie
- Allow semicolon as CSV separator
- Schemas, sequences and types support (PostgreSQL)
- Autofocus username in login form
- Allow to insert Tab in SQL textareas and send the form by Ctrl+Enter
- Disable spellchecking in SQL textareas
- Display auto_increment value of inserted item
- Allow disabling auto_increment value export
- Prefill auto_increment column name
- Ability to jump to any page in select by JavaScript
- Display comment in table overview
- Link last page above data in select
- Link table names in SQL queries
- Hungarian, Japanese and Tamil translation
- Defer table information in database overview to JavaScript (performance)
- Big tables optimizations (performance)

## Adminer 2.3.2 (released 2010-04-21)
- Fix COUNT(*) link
- Fix Save and continue edit

## Adminer 2.3.1 (released 2010-04-06)
- Add Drop button to Alter pages (regression from 2.0.0)
- Link COUNT(*) result to listing
- Newlines in select query edit
- Return to referrer after edit
- Respect session.auto_start (bug SF-42)

## Adminer 2.3.0 (released 2010-02-26)
- Support for permanent login (customization required)
- Search in all tables
- Show status variables
- Print sums in tables overview
- Add Delete button to Edit page (regression from 2.0.0)
- Print error summary in SQL command
- Simplify SQL syntax error message
- Show SQL query info if available
- Delete length when changing type in alter table
- Ability to check table prefix in export

## Adminer 2.2.1 (released 2009-11-26)
- Highlight current links
- Improve concurrency
- Move number of tables to DB info (performance)
- Search by foreign keys (Editor)
- Link new item in backward keys (Editor)

## Adminer 2.2.0 (released 2009-10-20)
- Database list - bulk drop, number of tables
- Enlarge field for enum and set definition
- Display table links above table structure
- Link URLs in select
- Display number of manipulated rows in JS confirm
- Set required memory in SQL command
- Fix removed default in ALTER
- Display whitespace in texts (bug SF-11)
- ClickJacking protection in modern browsers
- E-mail attachments (Editor)
- Optional year in date (Editor)
- Search operators (Editor)
- Align numbers to right in select (Editor)
- Move &lt;h1> to $adminer->navigation (customization)
- Rename get_dbh to connection (customization)

## Adminer 2.1.0 (released 2009-09-12)
- Edit default values directly in table creation
- Execute SQL file stored on server disk
- Display EXPLAIN in SQL query
- Compress export and import
- Display column comments in table overview
- Use ON DUPLICATE KEY UPDATE for CSV import
- Print ALTER export instead of executing it
- Click on row selects it
- Fix Editor date format
- Fix long SQL query crash (bug SF-3)
- Speed up simple alter table
- Traditional Chinese translation

## Adminer 2.0.0 (released 2009-08-06)
- Editor: User friendly data editor
- Customization: Adminer class
- Create single column foreign key in table structure
- Table relations (Editor)
- Send e-mails (Editor)
- Display images in blob (Editor)
- Localize date (Editor)
- Treat tinyint(1) as bool (Editor)
- Divide types to groups in table creation
- Link e-mails in select
- Show type in field name title
- Preselect now() for timestamp columns
- Clear history
- Prefill insert by foreign key searches
- Print number of rows in SQL command
- Remove Delete button from Edit page - use mass operation for it
- Faster multiple update, clone and delete
- Faster table list in navigation
- Download version checker and syntax highlighting from HTTPS
- Use HTML Strict instead of XHTML
- Remove function minification in favor of performance and customization
- Fix grant ALL PRIVILEGES with GRANT OPTION
- Fix CSV import
- Fix work with default values

## Adminer 1.11.1 (released 2009-07-03)
- Fix problem with enabled Filter extension

## Adminer 1.11.0 (released 2009-07-02)
- Connection through socket by server :/path/to/socket
- Simplify export
- Display execution time in SQL query
- Relative date and time functions
- Version checker
- Save queries to history and display it on SQL page
- Display MySQL variables
- Ability to select all rows on current page of select
- Separate JavaScript functions
- Always use the default style before the external one
- Always try to use the syntax highlighter
- All privileges in user rights
- Fix FOUND_ROWS() in SQL command
- Export only selected columns in select
- Bulk database creation
- Include views in drop and move on database overview
- Hide fieldsets in select
- Automatically add new fields in table creation
- Use \n in SQL commands

## phpMinAdmin 1.10.1 (released 2009-05-07)
- Highlight odd and hover rows
- Partition editing comfort (bug SF-12)
- Allow full length in limited int

## phpMinAdmin 1.10.0 (released 2009-04-28)
- Partitioning (MySQL 5.1)
- CSV import
- Plus and minus functions
- Option to stop on error in SQL command
- Cross links to select and table (bug SF-5), link new item
- Suhosin compatibility
- Remove max_allowed_packet from export
- Read style from phpMinAdmin.css if exists
- Size reduction by minification of variables and functions
- Russian translation

## phpMinAdmin 1.9.1 (released 2008-10-27)
- Update translations

## phpMinAdmin 1.9.0 (released 2008-10-16)
- List of tables and views with maintenance commands
- Clone rows
- Bulk edit and clone
- Function results in edit
- NOT operators in select
- Search without column restriction
- Use type=password for unhashed password
- Only one button for each action in select
- Choose language through option-list
- XHTML syntax errors
- Don't set global variable in export
- SHOW DATABASES can be revoked
- Order by function result working also in older MySQL versions
- Tested on IIS

## phpMinAdmin 1.8.0 (released 2008-09-12)
- Events (MySQL 5.1)
- Access without login - accept ?username=
- Print SQL query in select, messages and warnings
- Display number of found rows
- Don't wrap lines in select table
- Italian and Estonian translation
- Order by COUNT(*)

## phpMinAdmin 1.7.0 (released 2008-08-26)
- Customizable export (select objects to export, SQL or CSV)
- Ability to alter existing tables and drop old tables in export
- Choose columns in select, aggregation
- Order rows by clicking on table heading
- Truncate only search results
- Automatically select name for trigger
- Chinese and French translation
- Preserve default values when altering table
- Maintain auto_increment when moving columns
- Smaller multilingual file
- Cache static files
- Faster checking of number of results

## phpMinAdmin 1.6.1 (released 2008-05-22)
- Set session parameters only if not session.auto_start

## phpMinAdmin 1.6.0 (released 2008-05-16)
- Order of columns in table
- Set max_allowed_packet in dump and use extended insert
- Spanish and German translations
- Use images for editing buttons
- Protection against big POST data
- Logout by POST
- Information about logged user
- Separate stylesheet
- Last-Modified header for files
- Several bug fixes

## phpMinAdmin 1.5.0 (released 2008-01-09)
- Mass delete
- Vertical privileges
- Specify connection port by colon in server
- Ignore length in date and time types
- Boolean fulltext search for all columns in MyISAM
- Shrink compiled output
- Remove maxlength from server and username
- Uncheck NULL by change
- Mark shortened fields in select

## phpMinAdmin 1.4.0 (released 2007-08-15)
- Privileges
- New design
- Dutch translation
- Use NULL for auto_increment (bug SF-1)
- Fix dropping procedure parameters

## phpMinAdmin 1.3.2 (released 2007-08-06)
- Next field by JavaScript in foreign keys
- Set time zone in dump
- Refresh lang cookie
- Remember drop result in case of faulty create
- Move vertical lines in schema properly
- Fix maximum page in select

## phpMinAdmin 1.3.1 (released 2007-07-31)
- Move references lines in schema
- Fix dump
- Fix update links

## phpMinAdmin 1.3.0 (released 2007-07-27)
- Breadcrumb navigation
- Operator IN
- Timestamp default values
- Draggable tables in schema
- Number of rows in navigation
- Display MySQL version and used PHP extension
- More friendly user interface
- Slovak translation

## phpMinAdmin 1.2.0 (released 2007-07-25)
- Manipulate triggers
- PDO Abstraction
- Auto_increment value
- JavaScript for adding rows

## phpMinAdmin 1.1.0 (released 2007-07-19)
- Routines manipulation
- Views manipulation
- Foreign keys manipulation
- Database schema with references
- Processlist
- Index length
- Dump individual tables
- JavaScript for next rows in table edit
- Cache databases list

## phpMinAdmin 1.0.0 (released 2007-07-11)
- First official release

`SF-` means https://sourceforge.net/p/adminer/bugs-and-features/


================================================
FILE: CONTRIBUTING.md
================================================
- Reproducible [bug reports](https://github.com/vrana/adminer/issues/new?template=bug_report.md) are warmly welcomed.
- [Feature requests](https://github.com/vrana/adminer/issues/new?template=BLANK_ISSUE) are also fine, but I'm quite picky about what to accept into Adminer. Please don't be offended if I close the issue as "Not Planned," especially if it can be achieved with a plugin.
- [Pull requests](https://github.com/vrana/adminer/pulls) for both bug fixes and simple features are welcome. Before working on anything more complicated, get familiar with the [Adminer philosophy](https://github.com/vrana/adminer/blob/master/developing.md).


================================================
FILE: LICENSE
================================================
Apache License 2.0 or GPL 2


================================================
FILE: Makefile
================================================
ROOT_DIRECTORY = $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))")
PHP := $(shell which php)
PORT := 8000


.DEFAULT_GOAL := default


.PHONY: default
default: compile

.PHONY: compile
compile:
	$(PHP) $(ROOT_DIRECTORY)/compile.php

.PHONY: server
server:
	php \
	  --server 127.0.0.1:$(PORT) \
	  --docroot $(ROOT_DIRECTORY)

.PHONY: initialize
initialize:
	git \
	  -C $(ROOT_DIRECTORY) \
	  submodule \
	  update \
	  --init \
	  --recursive

.PHONY: clean
clean:
	rm \
	  --recursive \
	  --force \
	  $(ROOT_DIRECTORY)/adminer.php

.PHONY: clean.all
clean.all: clean


================================================
FILE: README.md
================================================
# Adminer
**Adminer** is a full-featured database management tool written in PHP. It consists of a single file ready to deploy to the target server.
**Adminer Editor** offers data manipulation for end-users.

[Official Website](https://www.adminer.org/)

## Features
- **Supports:** MySQL, MariaDB, PostgreSQL, CockroachDB, SQLite, MS SQL, Oracle
- **Plugins for:** Elasticsearch, SimpleDB, MongoDB, Firebird, ClickHouse, IMAP
- **Requirements:** PHP 5.3+ (compiled file), PHP 7.4+ (source codes)

## Screenshot
![Table structure](https://www.adminer.org/static/screenshots/table.png)

## Installation
If downloaded from Git then run: `git submodule update --init`

- `adminer/index.php` - Run development version of Adminer
- `editor/index.php` - Run development version of Adminer Editor
- `editor/example.php` - Example customization
- `compile.php` - Create a single file version
- `lang.php` - Update translations
- `tests/*.html` - Katalon Recorder test suites

## Plugins
There are several plugins distributed with Adminer, as well as many user-contributed plugins listed on the [Adminer Plugins page](https://www.adminer.org/plugins/).


================================================
FILE: SECURITY.md
================================================
# Security Policy

## Supported Versions

Only the latest published version and the latest development version (last commit) are supported.

## Reporting a Vulnerability

To report a vulnerability, create a new draft security advisory at [GitHub Security Advisories](https://github.com/vrana/adminer/security/advisories/new).

Security issues are handled with top priority. If you don't receive a response within a week, please follow up on the report. Once a vulnerability is acknowledged, a fix should be available and a new version released within a few days. The issue will be made public after the fix is released or if the report is declined.


================================================
FILE: adminer/call.inc.php
================================================
<?php
namespace Adminer;

$PROCEDURE = ($_GET["name"] ?: $_GET["call"]);
page_header(lang('Call') . ": " . h($PROCEDURE), $error);

$routine = routine($_GET["call"], (isset($_GET["callf"]) ? "FUNCTION" : "PROCEDURE"));
$in = array();
$out = array();
foreach ($routine["fields"] as $i => $field) {
	if (substr($field["inout"], -3) == "OUT" && JUSH == 'sql') {
		$out[$i] = "@" . idf_escape($field["field"]) . " AS " . idf_escape($field["field"]);
	}
	if (!$field["inout"] || substr($field["inout"], 0, 2) == "IN") {
		$in[] = $i;
	}
}

if (!$error && $_POST) {
	$call = array();
	foreach ($routine["fields"] as $key => $field) {
		$val = "";
		if (in_array($key, $in)) {
			$val = process_input($field);
			if ($val === false) {
				$val = "''";
			}
			if (isset($out[$key])) {
				connection()->query("SET @" . idf_escape($field["field"]) . " = $val");
			}
		}
		if (isset($out[$key])) {
			$call[] = "@" . idf_escape($field["field"]);
		} elseif (in_array($key, $in)) {
			$call[] = $val;
		}
	}

	$query = (isset($_GET["callf"]) ? "SELECT " : "CALL ") . (idx($routine["returns"], "type") == "record" ? "* FROM " : "") . table($PROCEDURE) . "(" . implode(", ", $call) . ")";
	$start = microtime(true);
	$result = connection()->multi_query($query);
	$affected = connection()->affected_rows; // getting warnings overwrites this
	echo adminer()->selectQuery($query, $start, !$result);

	if (!$result) {
		echo "<p class='error'>" . error() . "\n";
	} else {
		$connection2 = connect();
		if ($connection2) {
			$connection2->select_db(DB);
		}

		do {
			$result = connection()->store_result();
			if (is_object($result)) {
				print_select_result($result, $connection2);
			} else {
				echo "<p class='message'>" . lang('Routine has been called, %d row(s) affected.', $affected)
					. " <span class='time'>" . @date("H:i:s") . "</span>\n" // @ - time zone may be not set
				;
			}
		} while (connection()->next_result());

		if ($out) {
			print_select_result(connection()->query("SELECT " . implode(", ", $out)));
		}
	}
}
?>

<form action="" method="post">
<?php
if ($in) {
	echo "<table class='layout'>\n";
	foreach ($in as $key) {
		$field = $routine["fields"][$key];
		$name = $field["field"];
		echo "<tr><th>" . adminer()->fieldName($field);
		$value = idx($_POST["fields"], $name);
		if ($value != "") {
			if ($field["type"] == "set") {
				$value = implode(",", $value);
			}
		}
		input($field, $value, idx($_POST["function"], $name, "")); // param name can be empty
		echo "\n";
	}
	echo "</table>\n";
}
?>
<p>
<input type="submit" value="<?php echo lang('Call'); ?>">
<?php echo input_token(); ?>
</form>

<pre>
<?php
/** Format string as table row
* @return string HTML
*/
function pre_tr(string $s): string {
	return preg_replace('~^~m', '<tr>', preg_replace('~\|~', '<td>', preg_replace('~\|$~m', "", rtrim($s))));
}

$table = '(\+--[-+]+\+\n)';
$row = '(\| .* \|\n)';
echo preg_replace_callback(
	"~^$table?$row$table?($row*)$table?~m",
	function ($match) {
		$first_row = pre_tr($match[2]);
		return "<table>\n" . ($match[1] ? "<thead>$first_row</thead>\n" : $first_row) . pre_tr($match[4]) . "\n</table>";
	},
	preg_replace(
		'~(\n(    -|mysql)&gt; )(.+)~',
		"\\1<code class='jush-sql'>\\3</code>",
		preg_replace('~(.+)\n---+\n~', "<b>\\1</b>\n", h($routine['comment']))
	)
);
?>
</pre>


================================================
FILE: adminer/check.inc.php
================================================
<?php
namespace Adminer;

$TABLE = $_GET["check"];
$name = $_GET["name"];
$row = $_POST;

if ($row && !$error) {
	if (JUSH == "sqlite") {
		$result = recreate_table($TABLE, $TABLE, array(), array(), array(), "", array(), "$name", ($row["drop"] ? "" : $row["clause"]));
	} else {
		$result = ($name == "" || queries("ALTER TABLE " . table($TABLE) . " DROP CONSTRAINT " . idf_escape($name)));
		if (!$row["drop"]) {
			$result = queries("ALTER TABLE " . table($TABLE) . " ADD" . ($row["name"] != "" ? " CONSTRAINT " . idf_escape($row["name"]) : "") . " CHECK ($row[clause])"); //! SQL injection
		}
	}
	queries_redirect(
		ME . "table=" . urlencode($TABLE),
		($row["drop"] ? lang('Check has been dropped.') : ($name != "" ? lang('Check has been altered.') : lang('Check has been created.'))),
		$result
	);
}

page_header(($name != "" ? lang('Alter check') . ": " . h($name) : lang('Create check')), $error, array("table" => $TABLE));

if (!$row) {
	$checks = driver()->checkConstraints($TABLE);
	$row = array("name" => $name, "clause" => $checks[$name]);
}
?>

<form action="" method="post">
<p><?php
if (JUSH != "sqlite") {
	echo lang('Name') . ': <input name="name" value="' . h($row["name"]) . '" data-maxlength="64" autocapitalize="off"> ';
}
echo doc_link(array(
	'sql' => "create-table-check-constraints.html",
	'mariadb' => "constraint/",
	'pgsql' => "ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS",
	'mssql' => "relational-databases/tables/create-check-constraints",
	'sqlite' => "lang_createtable.html#check_constraints",
), "?");
?>
<p><?php textarea("clause", $row["clause"]); ?>
<p><input type="submit" value="<?php echo lang('Save'); ?>">
<?php if ($name != "") { ?>
<input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?>
<?php } ?>
<?php echo input_token(); ?>
</form>


================================================
FILE: adminer/create.inc.php
================================================
<?php
namespace Adminer;

$TABLE = $_GET["create"];
$partition_by = driver()->partitionBy;
$partitions_info = ($partition_by ? driver()->partitionsInfo($TABLE) : array());

$referencable_primary = referencable_primary($TABLE);
$foreign_keys = array();
foreach ($referencable_primary as $table_name => $field) {
	$foreign_keys[str_replace("`", "``", $table_name) . "`" . str_replace("`", "``", $field["field"])] = $table_name; // not idf_escape() - used in JS
}

$orig_fields = array();
$table_status = array();
if ($TABLE != "") {
	$orig_fields = fields($TABLE);
	$table_status = table_status1($TABLE);
	if (count($table_status) < 2) { // there's only the Name field
		$error = lang('No tables.');
	}
}

$row = $_POST;
$row["fields"] = (array) $row["fields"];
if ($row["auto_increment_col"]) {
	$row["fields"][$row["auto_increment_col"]]["auto_increment"] = true;
}

if ($_POST) {
	save_settings(array("comments" => $_POST["comments"], "defaults" => $_POST["defaults"]));
}

if ($_POST && !process_fields($row["fields"]) && !$error) {
	if ($_POST["drop"]) {
		queries_redirect(substr(ME, 0, -1), lang('Table has been dropped.'), drop_tables(array($TABLE)));
	} else {
		$fields = array();
		$all_fields = array();
		$use_all_fields = false;
		$foreign = array();
		$orig_field = reset($orig_fields);
		$after = " FIRST";

		foreach ($row["fields"] as $key => $field) {
			$foreign_key = $foreign_keys[$field["type"]];
			$type_field = ($foreign_key !== null ? $referencable_primary[$foreign_key] : $field); //! can collide with user defined type
			if ($field["field"] != "") {
				if (!$field["generated"]) {
					$field["default"] = null;
				}
				$process_field = process_field($field, $type_field);
				$all_fields[] = array($field["orig"], $process_field, $after);
				if (!$orig_field || $process_field !== process_field($orig_field, $orig_field)) {
					$fields[] = array($field["orig"], $process_field, $after);
					if ($field["orig"] != "" || $after) {
						$use_all_fields = true;
					}
				}
				if ($foreign_key !== null) {
					$foreign[idf_escape($field["field"])] = ($TABLE != "" && JUSH != "sqlite" ? "ADD" : " ") . format_foreign_key(array(
						'table' => $foreign_keys[$field["type"]],
						'source' => array($field["field"]),
						'target' => array($type_field["field"]),
						'on_delete' => $field["on_delete"],
					));
				}
				$after = " AFTER " . idf_escape($field["field"]);
			} elseif ($field["orig"] != "") {
				$use_all_fields = true;
				$fields[] = array($field["orig"]);
			}
			if ($field["orig"] != "") {
				$orig_field = next($orig_fields);
				if (!$orig_field) {
					$after = "";
				}
			}
		}

		$partitioning = array();
		if (in_array($row["partition_by"], $partition_by)) {
			foreach ($row as $key => $val) {
				if (preg_match('~^partition~', $key)) {
					$partitioning[$key] = $val;
				}
			}
			foreach ($partitioning["partition_names"] as $key => $name) {
				if ($name == "") {
					unset($partitioning["partition_names"][$key]);
					unset($partitioning["partition_values"][$key]);
				}
			}
			$partitioning["partition_names"] = array_values($partitioning["partition_names"]);
			$partitioning["partition_values"] = array_values($partitioning["partition_values"]);
			if ($partitioning == $partitions_info) {
				$partitioning = array();
			}
		} elseif (preg_match("~partitioned~", $table_status["Create_options"])) {
			$partitioning = null;
		}

		$message = lang('Table has been altered.');
		if ($TABLE == "") {
			cookie("adminer_engine", $row["Engine"]);
			$message = lang('Table has been created.');
		}
		$name = trim($row["name"]);

		queries_redirect(ME . (support("table") ? "table=" : "select=") . urlencode($name), $message, alter_table(
			$TABLE,
			$name,
			(JUSH == "sqlite" && ($use_all_fields || $foreign) ? $all_fields : $fields),
			$foreign,
			($row["Comment"] != $table_status["Comment"] ? $row["Comment"] : null),
			($row["Engine"] && $row["Engine"] != $table_status["Engine"] ? $row["Engine"] : ""),
			($row["Collation"] && $row["Collation"] != $table_status["Collation"] ? $row["Collation"] : ""),
			($row["Auto_increment"] != "" ? number($row["Auto_increment"]) : ""),
			$partitioning
		));
	}
}

page_header(($TABLE != "" ? lang('Alter table') : lang('Create table')), $error, array("table" => $TABLE), h($TABLE));

if (!$_POST) {
	$types = driver()->types();
	$row = array(
		"Engine" => $_COOKIE["adminer_engine"],
		"fields" => array(array("field" => "", "type" => (isset($types["int"]) ? "int" : (isset($types["integer"]) ? "integer" : "")), "on_update" => "")),
		"partition_names" => array(""),
	);

	if ($TABLE != "") {
		$row = $table_status;
		$row["name"] = $TABLE;
		$row["fields"] = array();
		if (!$_GET["auto_increment"]) { // don't prefill by original Auto_increment for the sake of performance and not reusing deleted ids
			$row["Auto_increment"] = "";
		}
		foreach ($orig_fields as $field) {
			$field["generated"] = $field["generated"] ?: (isset($field["default"]) ? "DEFAULT" : "");
			$row["fields"][] = $field;
		}

		if ($partition_by) {
			$row += $partitions_info;
			$row["partition_names"][] = "";
			$row["partition_values"][] = "";
		}
	}
}

$collations = collations();
if (is_array(reset($collations))) {
	$collations = call_user_func_array('array_merge', array_values($collations));
}
$engines = driver()->engines();
// case of engine may differ
foreach ($engines as $engine) {
	if (!strcasecmp($engine, $row["Engine"])) {
		$row["Engine"] = $engine;
		break;
	}
}
?>

<form action="" method="post" id="form">
<p>
<?php
if (support("columns") || $TABLE == "") {
	echo lang('Table name') . ": <input name='name'" . ($TABLE == "" && !$_POST ? " autofocus" : "") . " data-maxlength='64' value='" . h($row["name"]) . "' autocapitalize='off'>\n";
	echo ($engines ? html_select("Engine", array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . on_help("event.target.value", 1) . script("qsl('select').onchange = helpClose;") . "\n" : "");
	if ($collations) {
		echo "<datalist id='collations'>" . optionlist($collations) . "</datalist>\n";
		echo (preg_match("~sqlite|mssql~", JUSH) ? "" : "<input list='collations' name='Collation' value='" . h($row["Collation"]) . "' placeholder='(" . lang('collation') . ")'>\n");
	}
	echo "<input type='submit' value='" . lang('Save') . "'>\n";
}

if (support("columns")) {
	echo "<div class='scrollable'>\n";
	echo "<table id='edit-fields' class='nowrap'>\n";
	edit_fields($row["fields"], $collations, "TABLE", $foreign_keys);
	echo "</table>\n";
	echo script("editFields();");
	echo "</div>\n<p>\n";
	echo lang('Auto Increment') . ": <input type='number' name='Auto_increment' class='size' value='" . h($row["Auto_increment"]) . "'>\n";
	echo checkbox("defaults", 1, ($_POST ? $_POST["defaults"] : get_setting("defaults")), lang('Default values'), "columnShow(this.checked, 5)", "jsonly");
	$comments = ($_POST ? $_POST["comments"] : get_setting("comments"));
	echo (support("comment")
		? checkbox("comments", 1, $comments, lang('Comment'), "editingCommentsClick(this, true);", "jsonly")
			. ' ' . (preg_match('~\n~', $row["Comment"])
				? "<textarea name='Comment' rows='2' cols='20'" . ($comments ? "" : " class='hidden'") . ">" . h($row["Comment"]) . "</textarea>"
				: '<input name="Comment" value="' . h($row["Comment"]) . '" data-maxlength="' . (min_version(5.5) ? 2048 : 60) . '"' . ($comments ? "" : " class='hidden'") . '>'
			)
		: '')
	;
	?>
<p>
<input type="submit" value="<?php echo lang('Save'); ?>">
<?php } ?>

<?php if ($TABLE != "") { ?>
<input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?>
<?php } ?>
<?php
if ($partition_by && (JUSH == 'sql' || $TABLE == "")) {
	$partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]);
	print_fieldset("partition", lang('Partition by'), $row["partition_by"]);
	echo "<p>" . html_select("partition_by", array_merge(array(""), $partition_by), $row["partition_by"]) . on_help("event.target.value.replace(/./, 'PARTITION BY \$&')", 1) . script("qsl('select').onchange = partitionByChange;");
	echo "(<input name='partition' value='" . h($row["partition"]) . "'>)\n";
	echo lang('Partitions') . ": <input type='number' name='partitions' class='size" . ($partition_table || !$row["partition_by"] ? " hidden" : "") . "' value='" . h($row["partitions"]) . "'>\n";
	echo "<table id='partition-table'" . ($partition_table ? "" : " class='hidden'") . ">\n";
	echo "<thead><tr><th>" . lang('Partition name') . "<th>" . lang('Values') . "</thead>\n";
	foreach ($row["partition_names"] as $key => $val) {
		echo '<tr>';
		echo '<td><input name="partition_names[]" value="' . h($val) . '" autocapitalize="off">';
		echo ($key == count($row["partition_names"]) - 1 ? script("qsl('input').oninput = partitionNameChange;") : '');
		echo '<td><input name="partition_values[]" value="' . h(idx($row["partition_values"], $key)) . '">';
	}
	echo "</table>\n</div></fieldset>\n";
}
echo input_token();
?>
</form>


================================================
FILE: adminer/database.inc.php
================================================
<?php
namespace Adminer;

$row = $_POST;

if ($_POST && !$error && !$_POST["add"]) {
	$name = trim($row["name"]);
	if ($_POST["drop"]) {
		$_GET["db"] = ""; // to save in global history
		queries_redirect(remove_from_uri("db|database"), lang('Database has been dropped.'), drop_databases(array(DB)));
	} elseif (DB !== $name) {
		// create or rename database
		if (DB != "") {
			$_GET["db"] = $name;
			queries_redirect(preg_replace('~\bdb=[^&]*&~', '', ME) . "db=" . urlencode($name), lang('Database has been renamed.'), rename_database($name, $row["collation"]));
		} else {
			$databases = explode("\n", str_replace("\r", "", $name));
			$success = true;
			$last = "";
			foreach ($databases as $db) {
				if (count($databases) == 1 || $db != "") { // ignore empty lines but always try to create single database
					if (!create_database($db, $row["collation"])) {
						$success = false;
					}
					$last = $db;
				}
			}
			restart_session();
			set_session("dbs", null);
			queries_redirect(ME . "db=" . urlencode($last), lang('Database has been created.'), $success);
		}
	} else {
		// alter database
		if (!$row["collation"]) {
			redirect(substr(ME, 0, -1));
		}
		query_redirect("ALTER DATABASE " . idf_escape($name) . (preg_match('~^[a-z0-9_]+$~i', $row["collation"]) ? " COLLATE $row[collation]" : ""), substr(ME, 0, -1), lang('Database has been altered.'));
	}
}

page_header(DB != "" ? lang('Alter database') : lang('Create database'), $error, array(), h(DB));

$collations = collations();
$name = DB;
if ($_POST) {
	$name = $row["name"];
} elseif (DB != "") {
	$row["collation"] = db_collation(DB, $collations);
} elseif (JUSH == "sql") {
	// propose database name with limited privileges
	foreach (get_vals("SHOW GRANTS") as $grant) {
		if (preg_match('~ ON (`(([^\\\\`]|``|\\\\.)*)%`\.\*)?~', $grant, $match) && $match[1]) {
			$name = stripcslashes(idf_unescape("`$match[2]`"));
			break;
		}
	}
}
?>

<form action="" method="post">
<p>
<?php
echo ($_POST["add"] || strpos($name, "\n")
	? '<textarea autofocus name="name" rows="10" cols="40">' . h($name) . '</textarea><br>'
	: '<input name="name" autofocus value="' . h($name) . '" data-maxlength="64" autocapitalize="off">'
) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $row["collation"]) . doc_link(array(
	'sql' => "charset-charsets.html",
	'mariadb' => "supported-character-sets-and-collations/",
	'mssql' => "relational-databases/system-functions/sys-fn-helpcollations-transact-sql",
)) : "");
?>
<input type="submit" value="<?php echo lang('Save'); ?>">
<?php
if (DB != "") {
	echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', DB)) . "\n";
} elseif (!$_POST["add"] && $_GET["db"] == "") {
	echo icon("plus", "add[0]", "+", lang('Add next')) . "\n";
}
echo input_token();
?>
</form>


================================================
FILE: adminer/db.inc.php
================================================
<?php
namespace Adminer;

$tables_views = array_merge((array) $_POST["tables"], (array) $_POST["views"]);

if ($tables_views && !$error && !$_POST["search"]) {
	$result = true;
	$message = "";
	if (JUSH == "sql" && $_POST["tables"] && count($_POST["tables"]) > 1 && ($_POST["drop"] || $_POST["truncate"] || $_POST["copy"])) {
		queries("SET foreign_key_checks = 0"); // allows to truncate or drop several tables at once
	}

	if ($_POST["truncate"]) {
		if ($_POST["tables"]) {
			$result = truncate_tables($_POST["tables"]);
		}
		$message = lang('Tables have been truncated.');
	} elseif ($_POST["move"]) {
		$result = move_tables((array) $_POST["tables"], (array) $_POST["views"], $_POST["target"]);
		$message = lang('Tables have been moved.');
	} elseif ($_POST["copy"]) {
		$result = copy_tables((array) $_POST["tables"], (array) $_POST["views"], $_POST["target"]);
		$message = lang('Tables have been copied.');
	} elseif ($_POST["drop"]) {
		if ($_POST["views"]) {
			$result = drop_views($_POST["views"]);
		}
		if ($result && $_POST["tables"]) {
			$result = drop_tables($_POST["tables"]);
		}
		$message = lang('Tables have been dropped.');
	} elseif (JUSH == "sqlite" && $_POST["check"]) {
		foreach ((array) $_POST["tables"] as $table) {
			foreach (get_rows("PRAGMA integrity_check(" . q($table) . ")") as $row) {
				$message .= "<b>" . h($table) . "</b>: " . h($row["integrity_check"]) . "<br>";
			}
		}
	} elseif (JUSH != "sql") {
		$result = (JUSH == "sqlite"
			? queries("VACUUM")
			: apply_queries("VACUUM" . ($_POST["optimize"] ? " ANALYZE" : ""), $_POST["tables"])
		);
		$message = lang('Tables have been optimized.');
	} elseif (!$_POST["tables"]) {
		$message = lang('No tables.');
	} elseif ($result = queries(($_POST["optimize"] ? "OPTIMIZE" : ($_POST["check"] ? "CHECK" : ($_POST["repair"] ? "REPAIR" : "ANALYZE"))) . " TABLE " . implode(", ", array_map('Adminer\idf_escape', $_POST["tables"])))) {
		while ($row = $result->fetch_assoc()) {
			$message .= "<b>" . h($row["Table"]) . "</b>: " . h($row["Msg_text"]) . "<br>";
		}
	}

	queries_redirect($_SERVER["REQUEST_URI"], $message, $result);
}

page_header(($_GET["ns"] == "" ? lang('Database') . ": " . h(DB) : lang('Schema') . ": " . h($_GET["ns"])), $error, true);

if (adminer()->homepage()) {
	if ($_GET["ns"] !== "") {
		$order = $_GET["order"];
		echo "<h3 id='tables-views'>" . lang('Tables and views') . "</h3>\n";
		$tables_list = ($order ? table_status() : tables_list());
		if (!$tables_list) {
			echo "<p class='message'>" . lang('No tables.') . "\n";
		} else {
			echo "<form action='' method='post'>\n";
			if (support("table")) {
				echo "<fieldset><legend>" . lang('Search data in tables') . " <span id='selected2'></span></legend><div>";
				echo html_select("op", adminer()->operators(), idx($_POST, "op", JUSH == "elastic" ? "should" : "LIKE %%"));
				echo " <input type='search' name='query' value='" . h($_POST["query"]) . "'>";
				echo script("qsl('input').onkeydown = partialArg(bodyKeydown, 'search');", "");
				echo " <input type='submit' name='search' value='" . lang('Search') . "'>\n";
				echo "</div></fieldset>\n";
				if ($_POST["search"] && $_POST["query"] != "") {
					$_GET["where"][0]["op"] = $_POST["op"];
					search_tables();
				}
			}
			echo "<div class='scrollable'>\n";
			echo "<table class='nowrap checkable odds'>\n";
			echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
			echo '<thead><tr class="wrap">';
			echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^(tables|views)\[/);", "");
			echo '<th><a href="' . h(substr(ME, 0, -1)) . '">' . lang('Table') . '</a>';
			$columns = array("Engine" => array(lang('Engine') . doc_link(array('sql' => 'storage-engines.html'))));
			if (collations()) {
				$columns["Collation"] = array(lang('Collation') . doc_link(array('sql' => 'charset-charsets.html', 'mariadb' => 'supported-character-sets-and-collations/')));
			}
			if (function_exists('Adminer\alter_table')) {
				$columns["Data_length"] = array(lang('Data Length') . doc_link(array('sql' => 'show-table-status.html', 'pgsql' => 'functions-admin.html#FUNCTIONS-ADMIN-DBOBJECT', 'oracle' => 'REFRN20286')), "create", lang('Alter table'));
			}
			if (support('indexes')) {
				$columns["Index_length"] = array(lang('Index Length') . doc_link(array('sql' => 'show-table-status.html', 'pgsql' => 'functions-admin.html#FUNCTIONS-ADMIN-DBOBJECT')), "indexes", lang('Alter indexes'));
			}
			$columns["Data_free"] = array(lang('Data Free') . doc_link(array('sql' => 'show-table-status.html')), "edit", lang('New item'));
			if (function_exists('Adminer\alter_table')) {
				$columns["Auto_increment"] = array(lang('Auto Increment') . doc_link(array('sql' => 'example-auto-increment.html', 'mariadb' => 'auto_increment/')), "auto_increment=1&create", lang('Alter table'));
			}
			$columns["Rows"] = array(lang('Rows') . doc_link(array('sql' => 'show-table-status.html', 'pgsql' => 'catalog-pg-class.html#CATALOG-PG-CLASS', 'oracle' => 'REFRN20286')), "select", lang('Select data'));
			if (support("comment")) {
				$columns["Comment"] = array(lang('Comment') . doc_link(array('sql' => 'show-table-status.html', 'pgsql' => 'functions-info.html#FUNCTIONS-INFO-COMMENT-TABLE')));
			}
			foreach ($columns as $key => $column) {
				echo "<th><a href='" . h(ME) . "order=$key'>$column[0]</a>";
			}
			echo "</thead>\n";

			if ($order) {
				uasort($tables_list, function ($a, $b) use ($order) {
					$return = ($a[$order] < $b[$order] ? -1 : ($a[$order] > $b[$order] ? 1 : 0)); // <=> available since PHP 7.1
					return (in_array($order, array('Engine', 'Collation', 'Comment')) ? $return : -$return);
				});
			}

			$tables = 0;
			foreach ($tables_list as $name => $status) {
				$view = ($order ? is_view($status) : $status !== null && !preg_match('~table|sequence~i', $status));
				$status = ($order ? $status : array('Engine' => $status));
				$id = h("Table-" . $name);
				echo '<tr><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array("$name", $tables_views, true), "", "", "", $id); // "$name" to check numeric table names
				echo '<th>' . (support("table") || support("indexes") ? "<a href='" . h(ME) . "table=" . urlencode($name) . "' title='" . lang('Show structure') . "' id='$id'>" . h($name) . '</a>' : h($name));
				if ($view && !preg_match('~materialized~i', $status['Engine'])) {
					$title = lang('View');
					echo '<td colspan="' . (count($columns) - 2) . '">' . (support("view") ? "<a href='" . h(ME) . "view=" . urlencode($name) . "' title='" . lang('Alter view') . "'>$title</a>" : $title);
					echo '<td align="right"><a href="' . h(ME) . "select=" . urlencode($name) . '" title="' . lang('Select data') . '">?</a>';
					echo '<td>' . h($status['Comment']);
				} else {
					foreach ($columns as $key => $column) {
						$id = " id='$key-" . h($name) . "'";
						$val = idx($status, $key, '?');
						echo ($column[1]
							? "<td align='right'><a href='" . h(ME . "$column[1]=") . urlencode($name) . "'$id title='$column[2]'>" . (is_numeric($val)
								? ($val < 0 ? '?' : ($key == "Rows" && $val && $status["Engine"] == (JUSH == "pgsql" ? "table" : "InnoDB") ? '~ ' : '') . format_number($val))
								: $val
							) . "</a>"
							: "<td id='$key-" . h($name) . "'>" . h($val)
						);
					}
					$tables++;
				}
				echo "\n";
			}

			echo "<tr><td><th>" . lang('%d in total', count($tables_list));
			echo "<td>" . h(JUSH == "sql" ? get_val("SELECT @@default_storage_engine") : "");
			echo (collations() ? "<td>" . h(db_collation(DB, collations())) : '');
			foreach (array("Data_length", "Index_length", "Data_free") as $key) {
				echo ($columns[$key] ? "<td align='right' id='sum-$key'>" : "");
			}
			echo "\n";

			echo "</table>\n";
			echo ($order ? '' : script("ajaxSetHtml('" . js_escape(ME) . "script=db');"));
			echo "</div>\n";
			if (!information_schema(DB)) {
				$vacuum = "<input type='submit' value='" . lang('Vacuum') . "'> " . on_help("'VACUUM'");
				$optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'> " . on_help(JUSH == "sql" ? "'OPTIMIZE TABLE'" : "'VACUUM ANALYZE'");
				$print = (JUSH == "sqlite" ? $vacuum . "<input type='submit' name='check' value='" . lang('Check') . "'> " . on_help("'PRAGMA integrity_check'")
				: (JUSH == "pgsql" ? $vacuum . $optimize
				: (JUSH == "sql" ? "<input type='submit' value='" . lang('Analyze') . "'> " . on_help("'ANALYZE TABLE'")
					. $optimize
					. "<input type='submit' name='check' value='" . lang('Check') . "'> " . on_help("'CHECK TABLE'")
					. "<input type='submit' name='repair' value='" . lang('Repair') . "'> " . on_help("'REPAIR TABLE'")
				: "")))
				. (function_exists('Adminer\truncate_tables') ? "<input type='submit' name='truncate' value='" . lang('Truncate') . "'> " . on_help(JUSH == "sqlite" ? "'DELETE'" : "'TRUNCATE" . (JUSH == "pgsql" ? "'" : " TABLE'")) . confirm() : "")
				. (function_exists('Adminer\drop_tables') ? "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . on_help("'DROP TABLE'") . confirm() : "");
				echo ($print ? "<div class='footer'><div>\n<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>$print\n</div></fieldset>\n" : "");

				$databases = (support("scheme") ? adminer()->schemas() : adminer()->databases());
				$script = "";
				if (count($databases) != 1 && JUSH != "sqlite") {
					echo "<fieldset><legend>" . lang('Move to other database') . " <span id='selected3'></span></legend><div>";
					$db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB));
					echo ($databases ? html_select("target", $databases, $db) : '<input name="target" value="' . h($db) . '" autocapitalize="off">');
					echo "</label> <input type='submit' name='move' value='" . lang('Move') . "'>";
					echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'> " . checkbox("overwrite", 1, $_POST["overwrite"], lang('overwrite')) : "");
					echo "</div></fieldset>\n";
					$script = " selectCount('selected3', formChecked(this, /^(tables|views)\[/));";
				}
				echo "<input type='hidden' name='all' value=''>"; // used by trCheck()
				echo script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^(tables|views)\[/));"
					. (support("table") ? " selectCount('selected2', formChecked(this, /^tables\[/) || $tables);" : "")
					. "$script }")
				;
				echo input_token();
				echo "</div></div>\n";
			}
			echo "</form>\n";
			echo script("tableCheck();");
		}

		echo (function_exists('Adminer\alter_table') ? "<p class='links'><a href='" . h(ME) . "create='>" . lang('Create table') . "</a>\n" : '');
		echo (support("view") ? "<a href='" . h(ME) . "view='>" . lang('Create view') . "</a>\n" : "");

		if (support("routine")) {
			echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";
			$routines = routines();
			if ($routines) {
				echo "<table class='odds'>\n";
				echo '<thead><tr><th>' . lang('Name') . '<td>' . lang('Type') . '<td>' . lang('Return type') . "<td></thead>\n";
				foreach ($routines as $row) {
					$name = ($row["SPECIFIC_NAME"] == $row["ROUTINE_NAME"] ? "" : "&name=" . urlencode($row["ROUTINE_NAME"])); // not computed on the pages to be able to print the header first
					echo '<tr>';
					echo '<th><a href="' . h(ME . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'callf=' : 'call=') . urlencode($row["SPECIFIC_NAME"]) . $name) . '">' . h($row["ROUTINE_NAME"]) . '</a>';
					echo '<td>' . h($row["ROUTINE_TYPE"]);
					echo '<td>' . h($row["DTD_IDENTIFIER"]);
					echo '<td><a href="' . h(ME . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'function=' : 'procedure=') . urlencode($row["SPECIFIC_NAME"]) . $name) . '">' . lang('Alter') . "</a>";
				}
				echo "</table>\n";
			}
			echo '<p class="links">'
				. (support("procedure") ? '<a href="' . h(ME) . 'procedure=">' . lang('Create procedure') . '</a>' : '')
				. '<a href="' . h(ME) . 'function=">' . lang('Create function') . "</a>\n"
			;
		}

		if (support("sequence")) {
			echo "<h3 id='sequences'>" . lang('Sequences') . "</h3>\n";
			$sequences = get_vals("SELECT sequence_name FROM information_schema.sequences WHERE sequence_schema = current_schema() ORDER BY sequence_name");
			if ($sequences) {
				echo "<table class='odds'>\n";
				echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
				foreach ($sequences as $val) {
					echo "<tr><th><a href='" . h(ME) . "sequence=" . urlencode($val) . "'>" . h($val) . "</a>\n";
				}
				echo "</table>\n";
			}
			echo "<p class='links'><a href='" . h(ME) . "sequence='>" . lang('Create sequence') . "</a>\n";
		}

		if (support("type")) {
			echo "<h3 id='user-types'>" . lang('User types') . "</h3>\n";
			$user_types = types();
			if ($user_types) {
				echo "<table class='odds'>\n";
				echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
				foreach ($user_types as $val) {
					echo "<tr><th><a href='" . h(ME) . "type=" . urlencode($val) . "'>" . h($val) . "</a>\n";
				}
				echo "</table>\n";
			}
			echo "<p class='links'><a href='" . h(ME) . "type='>" . lang('Create type') . "</a>\n";
		}

		if (support("event")) {
			echo "<h3 id='events'>" . lang('Events') . "</h3>\n";
			$rows = get_rows("SHOW EVENTS");
			if ($rows) {
				echo "<table>\n";
				echo "<thead><tr><th>" . lang('Name') . "<td>" . lang('Schedule') . "<td>" . lang('Start') . "<td>" . lang('End') . "<td></thead>\n";
				foreach ($rows as $row) {
					echo "<tr>";
					echo "<th>" . h($row["Name"]);
					echo "<td>" . ($row["Execute at"] ? lang('At given time') . "<td>" . $row["Execute at"] : lang('Every') . " " . $row["Interval value"] . " " . $row["Interval field"] . "<td>$row[Starts]");
					echo "<td>$row[Ends]";
					echo '<td><a href="' . h(ME) . 'event=' . urlencode($row["Name"]) . '">' . lang('Alter') . '</a>';
				}
				echo "</table>\n";
				$event_scheduler = get_val("SELECT @@event_scheduler");
				if ($event_scheduler && $event_scheduler != "ON") {
					echo "<p class='error'><code class='jush-sqlset'>event_scheduler</code>: " . h($event_scheduler) . "\n";
				}
			}
			echo '<p class="links"><a href="' . h(ME) . 'event=">' . lang('Create event') . "</a>\n";
		}
	}
}


================================================
FILE: adminer/designs.php
================================================
<?php
function adminer_object() {
	include_once "../plugins/designs.php";
	$designs = array();
	foreach (glob("../designs/*/*.css") as $filename) {
		$designs[$filename] = basename(dirname($filename));
	}
	return new Adminer\Plugins(array(
		new AdminerDesigns($designs),
	));
}

include "./index.php";


================================================
FILE: adminer/download.inc.php
================================================
<?php
namespace Adminer;

$TABLE = $_GET["download"];
$fields = fields($TABLE);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . friendly_url("$TABLE-" . implode("_", $_GET["where"])) . "." . friendly_url($_GET["field"]));
$select = array(idf_escape($_GET["field"]));
$result = driver()->select($TABLE, $select, array(where($_GET, $fields)), $select);
$row = ($result ? $result->fetch_row() : array());
echo driver()->value($row[0], $fields[$_GET["field"]]);
exit; // don't output footer


================================================
FILE: adminer/drivers/mssql.inc.php
================================================
<?php
/**
* @author Jakub Cernohuby
* @author Vladimir Stastka
* @author Jakub Vrana
*/

namespace Adminer;

add_driver("mssql", "MS SQL");

if (isset($_GET["mssql"])) {
	define('Adminer\DRIVER', "mssql");

	if (extension_loaded("sqlsrv") && $_GET["ext"] != "pdo") {
		class Db extends SqlDb {
			public $extension = "sqlsrv";
			private $link, $result;

			private function get_error() {
				$this->error = "";
				foreach (sqlsrv_errors() as $error) {
					$this->errno = $error["code"];
					$this->error .= "$error[message]\n";
				}
				$this->error = rtrim($this->error);
			}

			function attach(string $server, string $username, string $password): string {
				$connection_info = array("UID" => $username, "PWD" => $password, "CharacterSet" => "UTF-8");
				$ssl = adminer()->connectSsl();
				if (isset($ssl["Encrypt"])) {
					$connection_info["Encrypt"] = $ssl["Encrypt"];
				}
				if (isset($ssl["TrustServerCertificate"])) {
					$connection_info["TrustServerCertificate"] = $ssl["TrustServerCertificate"];
				}
				$db = adminer()->database();
				if ($db != "") {
					$connection_info["Database"] = $db;
				}
				list($host, $port) = host_port($server);
				$this->link = @sqlsrv_connect($host . ($port ? ",$port" : ""), $connection_info);
				if ($this->link) {
					$info = sqlsrv_server_info($this->link);
					$this->server_info = $info['SQLServerVersion'];
				} else {
					$this->get_error();
				}
				return ($this->link ? '' : $this->error);
			}

			function quote(string $string): string {
				$unicode = strlen($string) != strlen(utf8_decode($string));
				return ($unicode ? "N" : "") . "'" . str_replace("'", "''", $string) . "'";
			}

			function select_db(string $database) {
				return $this->query(use_sql($database));
			}

			function query(string $query, bool $unbuffered = false) {
				$result = sqlsrv_query($this->link, $query); //! , array(), ($unbuffered ? array() : array("Scrollable" => "keyset"))
				$this->error = "";
				if (!$result) {
					$this->get_error();
					return false;
				}
				return $this->store_result($result);
			}

			function multi_query(string $query) {
				$this->result = sqlsrv_query($this->link, $query);
				$this->error = "";
				if (!$this->result) {
					$this->get_error();
					return false;
				}
				return true;
			}

			function store_result($result = null) {
				if (!$result) {
					$result = $this->result;
				}
				if (!$result) {
					return false;
				}
				if (sqlsrv_field_metadata($result)) {
					return new Result($result);
				}
				$this->affected_rows = sqlsrv_rows_affected($result);
				return true;
			}

			function next_result(): bool {
				return $this->result ? !!sqlsrv_next_result($this->result) : false;
			}
		}

		class Result {
			public $num_rows;
			private $result, $offset = 0, $fields;

			function __construct($result) {
				$this->result = $result;
				// $this->num_rows = sqlsrv_num_rows($result); // available only in scrollable results
			}

			private function convert($row) {
				foreach ((array) $row as $key => $val) {
					if (is_a($val, 'DateTime')) {
						$row[$key] = $val->format("Y-m-d H:i:s");
					}
					//! stream
				}
				return $row;
			}

			function fetch_assoc() {
				return $this->convert(sqlsrv_fetch_array($this->result, SQLSRV_FETCH_ASSOC));
			}

			function fetch_row() {
				return $this->convert(sqlsrv_fetch_array($this->result, SQLSRV_FETCH_NUMERIC));
			}

			function fetch_field(): \stdClass {
				if (!$this->fields) {
					$this->fields = sqlsrv_field_metadata($this->result);
				}
				$field = $this->fields[$this->offset++];
				$return = new \stdClass;
				$return->name = $field["Name"];
				$return->type = ($field["Type"] == 1 ? 254 : 15);
				$return->charsetnr = 0;
				return $return;
			}

			function seek($offset) {
				for ($i=0; $i < $offset; $i++) {
					sqlsrv_fetch($this->result); // SQLSRV_SCROLL_ABSOLUTE added in sqlsrv 1.1
				}
			}

			function __destruct() {
				sqlsrv_free_stmt($this->result);
			}
		}

		function last_id($result) {
			return get_val("SELECT SCOPE_IDENTITY()"); // @@IDENTITY can return trigger INSERT
		}

		function explain($connection, $query) {
			$connection->query("SET SHOWPLAN_ALL ON");
			$return = $connection->query($query);
			$connection->query("SET SHOWPLAN_ALL OFF"); // connection is used also for indexes
			return $return;
		}

	} else {
		abstract class MssqlDb extends PdoDb {
			function select_db(string $database) {
				// database selection is separated from the connection so dbname in DSN can't be used
				return $this->query(use_sql($database));
			}

			function lastInsertId() {
				return $this->pdo->lastInsertId();
			}
		}

		function last_id($result) {
			return connection()->lastInsertId();
		}

		function explain($connection, $query) {
		}

		if (extension_loaded("pdo_sqlsrv")) {
			class Db extends MssqlDb {
				public $extension = "PDO_SQLSRV";

				function attach(string $server, string $username, string $password): string {
					list($host, $port) = host_port($server);
					return $this->dsn("sqlsrv:Server=$host" . ($port ? ",$port" : ""), $username, $password);
				}
			}

		} elseif (extension_loaded("pdo_dblib")) {
			class Db extends MssqlDb {
				public $extension = "PDO_DBLIB";

				function attach(string $server, string $username, string $password): string {
					list($host, $port) = host_port($server);
					return $this->dsn("dblib:charset=utf8;host=$host" . ($port ? (is_numeric($port) ? ";port=" : ";unix_socket=") . $port : ""), $username, $password);
				}
			}
		}
	}


	class Driver extends SqlDriver {
		static $extensions = array("SQLSRV", "PDO_SQLSRV", "PDO_DBLIB");
		static $jush = "mssql";

		public $insertFunctions = array("date|time" => "getdate");
		public $editFunctions = array(
			"int|decimal|real|float|money|datetime" => "+/-",
			"char|text" => "+",
		);

		public $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL");
		public $functions = array("len", "lower", "round", "upper");
		public $grouping = array("avg", "count", "count distinct", "max", "min", "sum");
		public $generated = array("PERSISTED", "VIRTUAL");
		public $onActions = "NO ACTION|CASCADE|SET NULL|SET DEFAULT";

		static function connect(string $server, string $username, string $password) {
			if ($server == "") {
				$server = "localhost:1433";
			}
			return parent::connect($server, $username, $password);
		}

		function __construct(Db $connection) {
			parent::__construct($connection);
			$this->types = array( //! use sys.types
				lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "int" => 10, "bigint" => 20, "bit" => 1, "decimal" => 0, "real" => 12, "float" => 53, "smallmoney" => 10, "money" => 20),
				lang('Date and time') => array("date" => 10, "smalldatetime" => 19, "datetime" => 19, "datetime2" => 19, "time" => 8, "datetimeoffset" => 10),
				lang('Strings') => array("char" => 8000, "varchar" => 8000, "text" => 2147483647, "nchar" => 4000, "nvarchar" => 4000, "ntext" => 1073741823),
				lang('Binary') => array("binary" => 8000, "varbinary" => 8000, "image" => 2147483647),
			);
		}

		function insertUpdate(string $table, array $rows, array $primary) {
			$fields = fields($table);
			$update = array();
			$where = array();
			$set = reset($rows);
			$columns = "c" . implode(", c", range(1, count($set)));
			$c = 0;
			$insert = array();
			foreach ($set as $key => $val) {
				$c++;
				$name = idf_unescape($key);
				if (!$fields[$name]["auto_increment"]) {
					$insert[$key] = "c$c";
				}
				if (isset($primary[$name])) {
					$where[] = "$key = c$c";
				} else {
					$update[] = "$key = c$c";
				}
			}
			$values = array();
			foreach ($rows as $set) {
				$values[] = "(" . implode(", ", $set) . ")";
			}
			if ($where) {
				$identity = queries("SET IDENTITY_INSERT " . table($table) . " ON");
				$return = queries(
					"MERGE " . table($table) . " USING (VALUES\n\t" . implode(",\n\t", $values) . "\n) AS source ($columns) ON " . implode(" AND ", $where) //! source, c1 - possible conflict
					. ($update ? "\nWHEN MATCHED THEN UPDATE SET " . implode(", ", $update) : "")
					. "\nWHEN NOT MATCHED THEN INSERT (" . implode(", ", array_keys($identity ? $set : $insert)) . ") VALUES (" . ($identity ? $columns : implode(", ", $insert)) . ");" // ; is mandatory
				);
				if ($identity) {
					queries("SET IDENTITY_INSERT " . table($table) . " OFF");
				}
			} else {
				$return = queries("INSERT INTO " . table($table) . " (" . implode(", ", array_keys($set)) . ") VALUES\n" . implode(",\n", $values));
			}
			return $return;
		}

		function begin() {
			return queries("BEGIN TRANSACTION");
		}

		function tableHelp(string $name, bool $is_view = false) {
			$links = array(
				"sys" => "catalog-views/sys-",
				"INFORMATION_SCHEMA" => "information-schema-views/",
			);
			$link = $links[get_schema()];
			if ($link) {
				return "relational-databases/system-$link" . preg_replace('~_~', '-', strtolower($name)) . "-transact-sql";
			}
		}
	}



	function idf_escape($idf) {
		return "[" . str_replace("]", "]]", $idf) . "]";
	}

	function table($idf) {
		return ($_GET["ns"] != "" ? idf_escape($_GET["ns"]) . "." : "") . idf_escape($idf);
	}

	function get_databases($flush) {
		return get_vals("SELECT name FROM sys.databases WHERE name NOT IN ('master', 'tempdb', 'model', 'msdb')");
	}

	function limit($query, $where, $limit, $offset = 0, $separator = " ") {
		return ($limit ? " TOP (" . ($limit + $offset) . ")" : "") . " $query$where"; // seek later
	}

	function limit1($table, $query, $where, $separator = "\n") {
		return limit($query, $where, 1, 0, $separator);
	}

	function db_collation($db, $collations) {
		return get_val("SELECT collation_name FROM sys.databases WHERE name = " . q($db));
	}

	function logged_user() {
		return get_val("SELECT SUSER_NAME()");
	}

	function tables_list() {
		return get_key_vals("SELECT name, type_desc FROM sys.all_objects WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V') ORDER BY name");
	}

	function count_tables($databases) {
		$return = array();
		foreach ($databases as $db) {
			connection()->select_db($db);
			$return[$db] = get_val("SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES");
		}
		return $return;
	}

	function table_status($name = "") {
		$return = array();
		foreach (
			get_rows("SELECT ao.name AS Name, ao.type_desc AS Engine, (SELECT value FROM fn_listextendedproperty(default, 'SCHEMA', schema_name(schema_id), 'TABLE', ao.name, null, null)) AS Comment
FROM sys.all_objects AS ao
WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V') " . ($name != "" ? "AND name = " . q($name) : "ORDER BY name")) as $row
		) {
			$return[$row["Name"]] = $row;
		}
		return $return;
	}

	function is_view($table_status) {
		return $table_status["Engine"] == "VIEW";
	}

	function fk_support($table_status) {
		return true;
	}

	function fields($table) {
		$comments = get_key_vals("SELECT objname, cast(value as varchar(max)) FROM fn_listextendedproperty('MS_DESCRIPTION', 'schema', " . q(get_schema()) . ", 'table', " . q($table) . ", 'column', NULL)");
		$return = array();
		$table_id = get_val("SELECT object_id FROM sys.all_objects WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V') AND name = " . q($table));
		foreach (
			get_rows("SELECT c.max_length, c.precision, c.scale, c.name, c.is_nullable, c.is_identity, c.collation_name, t.name type, d.definition [default], d.name default_constraint, i.is_primary_key
FROM sys.all_columns c
JOIN sys.types t ON c.user_type_id = t.user_type_id
LEFT JOIN sys.default_constraints d ON c.default_object_id = d.object_id
LEFT JOIN sys.index_columns ic ON c.object_id = ic.object_id AND c.column_id = ic.column_id
LEFT JOIN sys.indexes i ON ic.object_id = i.object_id AND ic.index_id = i.index_id
WHERE c.object_id = " . q($table_id)) as $row
		) {
			$type = $row["type"];
			$length = (preg_match("~char|binary~", $type)
				? intval($row["max_length"]) / ($type[0] == 'n' ? 2 : 1)
				: ($type == "decimal" ? "$row[precision],$row[scale]" : "")
			);
			$return[$row["name"]] = array(
				"field" => $row["name"],
				"full_type" => $type . ($length ? "($length)" : ""),
				"type" => $type,
				"length" => $length,
				"default" => (preg_match("~^\('(.*)'\)$~", $row["default"], $match) ? str_replace("''", "'", $match[1]) : $row["default"]),
				"default_constraint" => $row["default_constraint"],
				"null" => $row["is_nullable"],
				"auto_increment" => $row["is_identity"],
				"collation" => $row["collation_name"],
				"privileges" => array("insert" => 1, "select" => 1, "update" => 1, "where" => 1, "order" => 1),
				"primary" => $row["is_primary_key"],
				"comment" => $comments[$row["name"]],
			);
		}
		foreach (get_rows("SELECT * FROM sys.computed_columns WHERE object_id = " . q($table_id)) as $row) {
			$return[$row["name"]]["generated"] = ($row["is_persisted"] ? "PERSISTED" : "VIRTUAL");
			$return[$row["name"]]["default"] = $row["definition"];
		}
		return $return;
	}

	function indexes($table, $connection2 = null) {
		$return = array();
		// sp_statistics doesn't return information about primary key
		foreach (
			get_rows("SELECT i.name, key_ordinal, is_unique, is_primary_key, c.name AS column_name, is_descending_key
FROM sys.indexes i
INNER JOIN sys.index_columns ic ON i.object_id = ic.object_id AND i.index_id = ic.index_id
INNER JOIN sys.columns c ON ic.object_id = c.object_id AND ic.column_id = c.column_id
WHERE OBJECT_NAME(i.object_id) = " . q($table), $connection2) as $row
		) {
			$name = $row["name"];
			$return[$name]["type"] = ($row["is_primary_key"] ? "PRIMARY" : ($row["is_unique"] ? "UNIQUE" : "INDEX"));
			$return[$name]["lengths"] = array();
			$return[$name]["columns"][$row["key_ordinal"]] = $row["column_name"];
			$return[$name]["descs"][$row["key_ordinal"]] = ($row["is_descending_key"] ? '1' : null);
		}
		return $return;
	}

	function view($name) {
		return array("select" => preg_replace('~^(?:[^[]|\[[^]]*])*\s+AS\s+~isU', '', get_val("SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_SCHEMA = SCHEMA_NAME() AND TABLE_NAME = " . q($name))));
	}

	function collations() {
		$return = array();
		foreach (get_vals("SELECT name FROM fn_helpcollations()") as $collation) {
			$return[preg_replace('~_.*~', '', $collation)][] = $collation;
		}
		return $return;
	}

	function information_schema($db) {
		return get_schema() == "INFORMATION_SCHEMA";
	}

	function error() {
		return nl_br(h(preg_replace('~^(\[[^]]*])+~m', '', connection()->error)));
	}

	function create_database($db, $collation) {
		return queries("CREATE DATABASE " . idf_escape($db) . (preg_match('~^[a-z0-9_]+$~i', $collation) ? " COLLATE $collation" : ""));
	}

	function drop_databases($databases) {
		return queries("DROP DATABASE " . implode(", ", array_map('Adminer\idf_escape', $databases)));
	}

	function rename_database($name, $collation) {
		if (preg_match('~^[a-z0-9_]+$~i', $collation)) {
			queries("ALTER DATABASE " . idf_escape(DB) . " COLLATE $collation");
		}
		queries("ALTER DATABASE " . idf_escape(DB) . " MODIFY NAME = " . idf_escape($name));
		return true; //! false negative "The database name 'test2' has been set."
	}

	function auto_increment() {
		return " IDENTITY" . ($_POST["Auto_increment"] != "" ? "(" . number($_POST["Auto_increment"]) . ",1)" : "") . " PRIMARY KEY";
	}

	function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
		$alter = array();
		$comments = array();
		$orig_fields = fields($table);
		foreach ($fields as $field) {
			$column = idf_escape($field[0]);
			$val = $field[1];
			if (!$val) {
				$alter["DROP"][] = " COLUMN $column";
			} else {
				$val[1] = preg_replace("~( COLLATE )'(\\w+)'~", '\1\2', $val[1]);
				$comments[$field[0]] = $val[5];
				unset($val[5]);
				if (preg_match('~ AS ~', $val[3])) {
					unset($val[1], $val[2]);
				}
				if ($field[0] == "") {
					$alter["ADD"][] = "\n  " . implode("", $val) . ($table == "" ? substr($foreign[$val[0]], 16 + strlen($val[0])) : ""); // 16 - strlen("  FOREIGN KEY ()")
				} else {
					$default = $val[3];
					unset($val[3]); // default values are set separately
					unset($val[6]); //! identity can't be removed
					if ($column != $val[0]) {
						queries("EXEC sp_rename " . q(table($table) . ".$column") . ", " . q(idf_unescape($val[0])) . ", 'COLUMN'");
					}
					$alter["ALTER COLUMN " . implode("", $val)][] = "";
					$orig_field = $orig_fields[$field[0]];
					if (default_value($orig_field) != $default) {
						if ($orig_field["default"] !== null) {
							$alter["DROP"][] = " " . idf_escape($orig_field["default_constraint"]);
						}
						if ($default) {
							$alter["ADD"][] = "\n $default FOR $column";
						}
					}
				}
			}
		}
		if ($table == "") {
			return queries("CREATE TABLE " . table($name) . " (" . implode(",", (array) $alter["ADD"]) . "\n)");
		}
		if ($table != $name) {
			queries("EXEC sp_rename " . q(table($table)) . ", " . q($name));
		}
		if ($foreign) {
			$alter[""] = $foreign;
		}
		foreach ($alter as $key => $val) {
			if (!queries("ALTER TABLE " . table($name) . " $key" . implode(",", $val))) {
				return false;
			}
		}
		foreach ($comments as $key => $val) {
			$comment = substr($val, 9); // 9 - strlen(" COMMENT ")
			queries("EXEC sp_dropextendedproperty @name = N'MS_Description', @level0type = N'Schema', @level0name = " . q(get_schema()) . ", @level1type = N'Table', @level1name = " . q($name) . ", @level2type = N'Column', @level2name = " . q($key));
			queries("EXEC sp_addextendedproperty
@name = N'MS_Description',
@value = $comment,
@level0type = N'Schema',
@level0name = " . q(get_schema()) . ",
@level1type = N'Table',
@level1name = " . q($name) . ",
@level2type = N'Column',
@level2name = " . q($key))
			;
		}
		return true;
	}

	function alter_indexes($table, $alter) {
		$index = array();
		$drop = array();
		foreach ($alter as $val) {
			if ($val[2] == "DROP") {
				if ($val[0] == "PRIMARY") { //! sometimes used also for UNIQUE
					$drop[] = idf_escape($val[1]);
				} else {
					$index[] = idf_escape($val[1]) . " ON " . table($table);
				}
			} elseif (
				!queries(($val[0] != "PRIMARY"
					? "CREATE $val[0] " . ($val[0] != "INDEX" ? "INDEX " : "") . idf_escape($val[1] != "" ? $val[1] : uniqid($table . "_")) . " ON " . table($table)
					: "ALTER TABLE " . table($table) . " ADD PRIMARY KEY"
				) . " (" . implode(", ", $val[2]) . ")")
			) {
				return false;
			}
		}
		return (!$index || queries("DROP INDEX " . implode(", ", $index)))
			&& (!$drop || queries("ALTER TABLE " . table($table) . " DROP " . implode(", ", $drop)))
		;
	}

	function found_rows($table_status, $where) {
	}

	function foreign_keys($table) {
		$return = array();
		$on_actions = array("CASCADE", "NO ACTION", "SET NULL", "SET DEFAULT");
		foreach (get_rows("EXEC sp_fkeys @fktable_name = " . q($table) . ", @fktable_owner = " . q(get_schema())) as $row) {
			$foreign_key = &$return[$row["FK_NAME"]];
			$foreign_key["db"] = $row["PKTABLE_QUALIFIER"];
			$foreign_key["ns"] = $row["PKTABLE_OWNER"];
			$foreign_key["table"] = $row["PKTABLE_NAME"];
			$foreign_key["on_update"] = $on_actions[$row["UPDATE_RULE"]];
			$foreign_key["on_delete"] = $on_actions[$row["DELETE_RULE"]];
			$foreign_key["source"][] = $row["FKCOLUMN_NAME"];
			$foreign_key["target"][] = $row["PKCOLUMN_NAME"];
		}
		return $return;
	}

	function truncate_tables($tables) {
		return apply_queries("TRUNCATE TABLE", $tables);
	}

	function drop_views($views) {
		return queries("DROP VIEW " . implode(", ", array_map('Adminer\table', $views)));
	}

	function drop_tables($tables) {
		return queries("DROP TABLE " . implode(", ", array_map('Adminer\table', $tables)));
	}

	function move_tables($tables, $views, $target) {
		return apply_queries("ALTER SCHEMA " . idf_escape($target) . " TRANSFER", array_merge($tables, $views));
	}

	function trigger($name, $table) {
		if ($name == "") {
			return array();
		}
		$rows = get_rows(
			"SELECT s.name [Trigger],
CASE WHEN OBJECTPROPERTY(s.id, 'ExecIsInsertTrigger') = 1 THEN 'INSERT' WHEN OBJECTPROPERTY(s.id, 'ExecIsUpdateTrigger') = 1 THEN 'UPDATE' WHEN OBJECTPROPERTY(s.id, 'ExecIsDeleteTrigger') = 1 THEN 'DELETE' END [Event],
CASE WHEN OBJECTPROPERTY(s.id, 'ExecIsInsteadOfTrigger') = 1 THEN 'INSTEAD OF' ELSE 'AFTER' END [Timing],
c.text
FROM sysobjects s
JOIN syscomments c ON s.id = c.id
WHERE s.xtype = 'TR' AND s.name = " . q($name)
		); // triggers are not schema-scoped
		$return = reset($rows);
		if ($return) {
			$return["Statement"] = preg_replace('~^.+\s+AS\s+~isU', '', $return["text"]); //! identifiers, comments
		}
		return $return;
	}

	function triggers($table) {
		$return = array();
		foreach (
			get_rows("SELECT sys1.name,
CASE WHEN OBJECTPROPERTY(sys1.id, 'ExecIsInsertTrigger') = 1 THEN 'INSERT' WHEN OBJECTPROPERTY(sys1.id, 'ExecIsUpdateTrigger') = 1 THEN 'UPDATE' WHEN OBJECTPROPERTY(sys1.id, 'ExecIsDeleteTrigger') = 1 THEN 'DELETE' END [Event],
CASE WHEN OBJECTPROPERTY(sys1.id, 'ExecIsInsteadOfTrigger') = 1 THEN 'INSTEAD OF' ELSE 'AFTER' END [Timing]
FROM sysobjects sys1
JOIN sysobjects sys2 ON sys1.parent_obj = sys2.id
WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)) as $row
		) { // triggers are not schema-scoped
			$return[$row["name"]] = array($row["Timing"], $row["Event"]);
		}
		return $return;
	}

	function trigger_options() {
		return array(
			"Timing" => array("AFTER", "INSTEAD OF"),
			"Event" => array("INSERT", "UPDATE", "DELETE"),
			"Type" => array("AS"),
		);
	}

	function schemas() {
		return get_vals("SELECT name FROM sys.schemas");
	}

	function get_schema() {
		if ($_GET["ns"] != "") {
			return $_GET["ns"];
		}
		return get_val("SELECT SCHEMA_NAME()");
	}

	function set_schema($schema) {
		$_GET["ns"] = $schema;
		return true; // ALTER USER is permanent
	}

	function create_sql($table, $auto_increment, $style) {
		if (is_view(table_status1($table))) {
			$view = view($table);
			return "CREATE VIEW " . table($table) . " AS $view[select]";
		}
		$fields = array();
		$primary = false;
		foreach (fields($table) as $name => $field) {
			$val = process_field($field, $field);
			if ($val[6]) {
				$primary = true;
			}
			$fields[] = implode("", $val);
		}
		foreach (indexes($table) as $name => $index) {
			if (!$primary || $index["type"] != "PRIMARY") {
				$columns = array();
				foreach ($index["columns"] as $key => $val) {
					$columns[] = idf_escape($val) . ($index["descs"][$key] ? " DESC" : "");
				}
				$name = idf_escape($name);
				$fields[] = ($index["type"] == "INDEX" ? "INDEX $name" : "CONSTRAINT $name " . ($index["type"] == "UNIQUE" ? "UNIQUE" : "PRIMARY KEY")) . " (" . implode(", ", $columns) . ")";
			}
		}
		foreach (driver()->checkConstraints($table) as $name => $check) {
			$fields[] = "CONSTRAINT " . idf_escape($name) . " CHECK ($check)";
		}
		return "CREATE TABLE " . table($table) . " (\n\t" . implode(",\n\t", $fields) . "\n)";
	}

	function foreign_keys_sql($table) {
		$fields = array();
		foreach (foreign_keys($table) as $foreign) {
			$fields[] = ltrim(format_foreign_key($foreign));
		}
		return ($fields ? "ALTER TABLE " . table($table) . " ADD\n\t" . implode(",\n\t", $fields) . ";\n\n" : "");
	}

	function truncate_sql($table) {
		return "TRUNCATE TABLE " . table($table);
	}

	function use_sql($database, $style = "") {
		return "USE " . idf_escape($database);
	}

	function trigger_sql($table) {
		$return = "";
		foreach (triggers($table) as $name => $trigger) {
			$return .= create_trigger(" ON " . table($table), trigger($name, $table)) . ";";
		}
		return $return;
	}

	function convert_field($field) {
	}

	function unconvert_field($field, $return) {
		return $return;
	}

	function support($feature) {
		return preg_match('~^(check|comment|columns|database|drop_col|dump|indexes|descidx|scheme|sql|table|trigger|view|view_trigger)$~', $feature); //! routine|
	}
}


================================================
FILE: adminer/drivers/mysql.inc.php
================================================
<?php
namespace Adminer;

SqlDriver::$drivers = array("server" => "MySQL / MariaDB") + SqlDriver::$drivers;

if (!defined('Adminer\DRIVER')) {
	define('Adminer\DRIVER', "server"); // server - backwards compatibility

	// MySQLi supports everything, MySQL doesn't support multiple result sets, PDO_MySQL doesn't support orgtable
	if (extension_loaded("mysqli") && $_GET["ext"] != "pdo") {
		class Db extends \MySQLi {
			/** @var Db */ static $instance;
			public $extension = "MySQLi", $flavor = '';

			function __construct() {
				parent::init();
			}

			function attach(string $server, string $username, string $password): string {
				mysqli_report(MYSQLI_REPORT_OFF); // stays between requests, not required since PHP 5.3.4
				list($host, $port) = host_port($server);
				$ssl = adminer()->connectSsl();
				if ($ssl) {
					$this->ssl_set($ssl['key'], $ssl['cert'], $ssl['ca'], '', '');
				}
				$return = @$this->real_connect(
					($server != "" ? $host : ini_get("mysqli.default_host")),
					($server . $username != "" ? $username : ini_get("mysqli.default_user")),
					($server . $username . $password != "" ? $password : ini_get("mysqli.default_pw")),
					null,
					(is_numeric($port) ? intval($port) : ini_get("mysqli.default_port")),
					(is_numeric($port) ? null : $port),
					($ssl ? ($ssl['verify'] !== false ? 2048 : 64) : 0) // 2048 - MYSQLI_CLIENT_SSL, 64 - MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT (not available before PHP 5.6.16)
				);
				$this->options(MYSQLI_OPT_LOCAL_INFILE, 0);
				return ($return ? '' : $this->error);
			}

			function set_charset($charset) {
				if (parent::set_charset($charset)) {
					return true;
				}
				// the client library may not support utf8mb4
				parent::set_charset('utf8');
				return $this->query("SET NAMES $charset");
			}

			function next_result() {
				return self::more_results() && parent::next_result(); // triggers E_STRICT on PHP < 7.4 otherwise
			}

			function quote(string $string): string {
				return "'" . $this->escape_string($string) . "'";
			}
		}

	} elseif (extension_loaded("mysql") && !((ini_bool("sql.safe_mode") || ini_bool("mysql.allow_local_infile")) && extension_loaded("pdo_mysql"))) {
		class Db extends SqlDb {
			/** @var resource */ private $link;

			function attach(string $server, string $username, string $password): string {
				if (ini_bool("mysql.allow_local_infile")) {
					return lang('Disable %s or enable %s or %s extensions.', "'mysql.allow_local_infile'", "MySQLi", "PDO_MySQL");
				}
				$this->link = @mysql_connect(
					($server != "" ? $server : ini_get("mysql.default_host")),
					($server . $username != "" ? $username : ini_get("mysql.default_user")),
					($server . $username . $password != "" ? $password : ini_get("mysql.default_password")),
					true,
					131072 // CLIENT_MULTI_RESULTS for CALL
				);
				if (!$this->link) {
					return mysql_error();
				}
				$this->server_info = mysql_get_server_info($this->link);
				return '';
			}

			/** Set the client character set */
			function set_charset(string $charset): bool {
				if (function_exists('mysql_set_charset')) {
					if (mysql_set_charset($charset, $this->link)) {
						return true;
					}
					// the client library may not support utf8mb4
					mysql_set_charset('utf8', $this->link);
				}
				return $this->query("SET NAMES $charset");
			}

			function quote(string $string): string {
				return "'" . mysql_real_escape_string($string, $this->link) . "'";
			}

			function select_db(string $database) {
				return mysql_select_db($database, $this->link);
			}

			function query(string $query, bool $unbuffered = false) {
				$result = @($unbuffered ? mysql_unbuffered_query($query, $this->link) : mysql_query($query, $this->link)); // @ - mute mysql.trace_mode
				$this->error = "";
				if (!$result) {
					$this->errno = mysql_errno($this->link);
					$this->error = mysql_error($this->link);
					return false;
				}
				if ($result === true) {
					$this->affected_rows = mysql_affected_rows($this->link);
					$this->info = mysql_info($this->link);
					return true;
				}
				return new Result($result);
			}
		}

		class Result {
			public $num_rows; // number of rows in the result
			/** @var resource */ private $result;
			private int $offset = 0;

			/** @param resource $result */
			function __construct($result) {
				$this->result = $result;
				$this->num_rows = mysql_num_rows($result);
			}

			/** Fetch next row as associative array
			* @return array<?string>|false
			*/
			function fetch_assoc() {
				return mysql_fetch_assoc($this->result);
			}

			/** Fetch next row as numbered array
			* @return list<?string>|false
			*/
			function fetch_row() {
				return mysql_fetch_row($this->result);
			}

			/** Fetch next field
			* @return \stdClass properties: name, type (0 number, 15 varchar, 254 char), charsetnr (63 binary); optionally: table, orgtable, orgname
			*/
			function fetch_field(): \stdClass {
				$return = mysql_fetch_field($this->result, $this->offset++); // offset required under certain conditions
				$return->orgtable = $return->table;
				$return->charsetnr = ($return->blob ? 63 : 0);
				return $return;
			}

			/** Free result set */
			function __destruct() {
				mysql_free_result($this->result);
			}
		}

	} elseif (extension_loaded("pdo_mysql")) {
		class Db extends PdoDb {
			public $extension = "PDO_MySQL";

			function attach(string $server, string $username, string $password): string {
				$options = array(\PDO::MYSQL_ATTR_LOCAL_INFILE => false);
				$ssl = adminer()->connectSsl();
				if ($ssl) {
					if ($ssl['key']) {
						$options[\PDO::MYSQL_ATTR_SSL_KEY] = $ssl['key'];
					}
					if ($ssl['cert']) {
						$options[\PDO::MYSQL_ATTR_SSL_CERT] = $ssl['cert'];
					}
					if ($ssl['ca']) {
						$options[\PDO::MYSQL_ATTR_SSL_CA] = $ssl['ca'];
					}
					if (isset($ssl['verify'])) {
						$options[\PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = $ssl['verify'];
					}
				}
				list($host, $port) = host_port($server);
				return $this->dsn(
					"mysql:charset=utf8;host=$host" . ($port ? (is_numeric($port) ? ";port=" : ";unix_socket=") . $port : ""),
					$username,
					$password,
					$options
				);
			}

			function set_charset($charset) {
				return $this->query("SET NAMES $charset"); // charset in DSN is ignored before PHP 5.3.6
			}

			function select_db(string $database) {
				// database selection is separated from the connection so dbname in DSN can't be used
				return $this->query("USE " . idf_escape($database));
			}

			function query(string $query, bool $unbuffered = false) {
				$this->pdo->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, !$unbuffered);
				return parent::query($query, $unbuffered);
			}
		}

	}



	class Driver extends SqlDriver {
		static $extensions = array("MySQLi", "MySQL", "PDO_MySQL");
		static $jush = "sql"; // JUSH identifier

		public $unsigned = array("unsigned", "zerofill", "unsigned zerofill");
		public $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "FIND_IN_SET", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL");
		public $functions = array("char_length", "date", "from_unixtime", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper");
		public $grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum");

		static function connect(string $server, string $username, string $password) {
			$connection = parent::connect($server, $username, $password);
			if (is_string($connection)) {
				if (function_exists('iconv') && !is_utf8($connection) && strlen($s = iconv("windows-1250", "utf-8", $connection)) > strlen($connection)) { // windows-1250 - most common Windows encoding
					$connection = $s;
				}
				return $connection;
			}
			$connection->set_charset(charset($connection));
			$connection->query("SET sql_quote_show_create = 1, autocommit = 1");
			$connection->flavor = (preg_match('~MariaDB~', $connection->server_info) ? 'maria' : 'mysql');
			add_driver(DRIVER, ($connection->flavor == 'maria' ? "MariaDB" : "MySQL"));
			return $connection;
		}

		function __construct(Db $connection) {
			parent::__construct($connection);
			$this->types = array(
				lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "mediumint" => 8, "int" => 10, "bigint" => 20, "decimal" => 66, "float" => 12, "double" => 21),
				lang('Date and time') => array("date" => 10, "datetime" => 19, "timestamp" => 19, "time" => 10, "year" => 4),
				lang('Strings') => array("char" => 255, "varchar" => 65535, "tinytext" => 255, "text" => 65535, "mediumtext" => 16777215, "longtext" => 4294967295),
				lang('Lists') => array("enum" => 65535, "set" => 64),
				lang('Binary') => array("bit" => 20, "binary" => 255, "varbinary" => 65535, "tinyblob" => 255, "blob" => 65535, "mediumblob" => 16777215, "longblob" => 4294967295),
				lang('Geometry') => array("geometry" => 0, "point" => 0, "linestring" => 0, "polygon" => 0, "multipoint" => 0, "multilinestring" => 0, "multipolygon" => 0, "geometrycollection" => 0),
			);
			$this->insertFunctions = array(
				"char" => "md5/sha1/password/encrypt/uuid",
				"binary" => "md5/sha1",
				"date|time" => "now",
			);
			$this->editFunctions = array(
				number_type() => "+/-",
				"date" => "+ interval/- interval",
				"time" => "addtime/subtime",
				"char|text" => "concat",
			);
			if (min_version('5.7.8', 10.2, $connection)) {
				$this->types[lang('Strings')]["json"] = 4294967295;
			}
			if (min_version('', 10.7, $connection)) {
				$this->types[lang('Strings')]["uuid"] = 128;
				$this->insertFunctions['uuid'] = 'uuid';
			}
			if (min_version(9, '', $connection)) {
				$this->types[lang('Numbers')]["vector"] = 16383;
				$this->insertFunctions['vector'] = 'string_to_vector';
			}
			if (min_version(5.1, '', $connection)) {
				$this->partitionBy = array("HASH", "LINEAR HASH", "KEY", "LINEAR KEY", "RANGE", "LIST");
			}
			if (min_version(5.7, 10.2, $connection)) {
				$this->generated = array("STORED", "VIRTUAL");
			}
		}

		function unconvertFunction(array $field) {
			return (preg_match("~binary~", $field["type"]) ? "<code class='jush-sql'>UNHEX</code>"
				: ($field["type"] == "bit" ? doc_link(array('sql' => 'bit-value-literals.html'), "<code>b''</code>")
				: (preg_match("~geometry|point|linestring|polygon~", $field["type"]) ? "<code class='jush-sql'>GeomFromText</code>"
				: "")));
		}

		function insert(string $table, array $set) {
			return ($set ? parent::insert($table, $set) : queries("INSERT INTO " . table($table) . " ()\nVALUES ()"));
		}

		function insertUpdate(string $table, array $rows, array $primary) {
			$columns = array_keys(reset($rows));
			$prefix = "INSERT INTO " . table($table) . " (" . implode(", ", $columns) . ") VALUES\n";
			$values = array();
			foreach ($columns as $key) {
				$values[$key] = "$key = VALUES($key)";
			}
			$suffix = "\nON DUPLICATE KEY UPDATE " . implode(", ", $values);
			$values = array();
			$length = 0;
			foreach ($rows as $set) {
				$value = "(" . implode(", ", $set) . ")";
				if ($values && (strlen($prefix) + $length + strlen($value) + strlen($suffix) > 1e6)) { // 1e6 - default max_allowed_packet
					if (!queries($prefix . implode(",\n", $values) . $suffix)) {
						return false;
					}
					$values = array();
					$length = 0;
				}
				$values[] = $value;
				$length += strlen($value) + 2; // 2 - strlen(",\n")
			}
			return queries($prefix . implode(",\n", $values) . $suffix);
		}

		function slowQuery(string $query, int $timeout) {
			if (min_version('5.7.8', '10.1.2')) {
				if ($this->conn->flavor == 'maria') {
					return "SET STATEMENT max_statement_time=$timeout FOR $query";
				} elseif (preg_match('~^(SELECT\b)(.+)~is', $query, $match)) {
					return "$match[1] /*+ MAX_EXECUTION_TIME(" . ($timeout * 1000) . ") */ $match[2]";
				}
			}
		}

		function convertSearch(string $idf, array $val, array $field): string {
			return (preg_match('~char|text|enum|set~', $field["type"]) && !preg_match("~^utf8~", $field["collation"]) && preg_match('~[\x80-\xFF]~', $val['val'])
				? "CONVERT($idf USING " . charset($this->conn) . ")"
				: $idf
			);
		}

		function warnings() {
			$result = $this->conn->query("SHOW WARNINGS");
			if ($result && $result->num_rows) {
				ob_start();
				print_select_result($result); // print_select_result() usually needs to print a big table progressively
				return ob_get_clean();
			}
		}

		function tableHelp(string $name, bool $is_view = false) {
			$maria = ($this->conn->flavor == 'maria');
			if (information_schema(DB)) {
				return strtolower("information-schema-" . ($maria ? "$name-table/" : str_replace("_", "-", $name) . "-table.html"));
			}
			if (DB == "mysql") {
				return ($maria ? "mysql$name-table/" : "system-schema.html"); //! more precise link
			}
		}

		function partitionsInfo(string $table): array {
			$from = "FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = " . q(DB) . " AND TABLE_NAME = " . q($table);
			$result = $this->conn->query("SELECT PARTITION_METHOD, PARTITION_EXPRESSION, PARTITION_ORDINAL_POSITION $from ORDER BY PARTITION_ORDINAL_POSITION DESC LIMIT 1");
			$return = array();
			list($return["partition_by"], $return["partition"], $return["partitions"]) = $result->fetch_row();
			$partitions = get_key_vals("SELECT PARTITION_NAME, PARTITION_DESCRIPTION $from AND PARTITION_NAME != '' ORDER BY PARTITION_ORDINAL_POSITION");
			$return["partition_names"] = array_keys($partitions);
			$return["partition_values"] = array_values($partitions);
			return $return;
		}

		function hasCStyleEscapes(): bool {
			static $c_style;
			if ($c_style === null) {
				$sql_mode = get_val("SHOW VARIABLES LIKE 'sql_mode'", 1, $this->conn);
				$c_style = (strpos($sql_mode, 'NO_BACKSLASH_ESCAPES') === false);
			}
			return $c_style;
		}

		function engines(): array {
			$return = array();
			foreach (get_rows("SHOW ENGINES") as $row) {
				if (preg_match("~YES|DEFAULT~", $row["Support"])) {
					$return[] = $row["Engine"];
				}
			}
			return $return;
		}

		function indexAlgorithms(array $tableStatus): array {
			return (preg_match('~^(MEMORY|NDB)$~', $tableStatus["Engine"]) ? array("HASH", "BTREE") : array());
		}
	}



	/** Escape database identifier */
	function idf_escape(string $idf): string {
		return "`" . str_replace("`", "``", $idf) . "`";
	}

	/** Get escaped table name */
	function table(string $idf): string {
		return idf_escape($idf);
	}

	/** Get cached list of databases
	* @return list<string>
	*/
	function get_databases(bool $flush): array {
		// SHOW DATABASES can take a very long time so it is cached
		$return = get_session("dbs");
		if ($return === null) {
			$query = "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA ORDER BY SCHEMA_NAME"; // SHOW DATABASES can be disabled by skip_show_database
			$return = ($flush ? slow_query($query) : get_vals($query));
			restart_session();
			set_session("dbs", $return);
			stop_session();
		}
		return $return;
	}

	/** Formulate SQL query with limit
	* @param string $query everything after SELECT
	* @param string $where including WHERE
	*/
	function limit(string $query, string $where, int $limit, int $offset = 0, string $separator = " "): string {
		return " $query$where" . ($limit ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
	}

	/** Formulate SQL modification query with limit 1
	* @param string $query everything after UPDATE or DELETE
	*/
	function limit1(string $table, string $query, string $where, string $separator = "\n"): string {
		return limit($query, $where, 1, 0, $separator);
	}

	/** Get database collation
	* @param string[][] $collations result of collations()
	*/
	function db_collation(string $db, array $collations): ?string {
		$return = null;
		$create = get_val("SHOW CREATE DATABASE " . idf_escape($db), 1);
		if (preg_match('~ COLLATE ([^ ]+)~', $create, $match)) {
			$return = $match[1];
		} elseif (preg_match('~ CHARACTER SET ([^ ]+)~', $create, $match)) {
			// default collation
			$return = $collations[$match[1]][-1];
		}
		return $return;
	}

	/** Get logged user */
	function logged_user(): string {
		return get_val("SELECT USER()");
	}

	/** Get tables list
	* @return string[] [$name => $type]
	*/
	function tables_list(): array {
		return get_key_vals("SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME");
	}

	/** Count tables in all databases
	* @param list<string> $databases
	* @return int[] [$db => $tables]
	*/
	function count_tables(array $databases): array {
		$return = array();
		foreach ($databases as $db) {
			$return[$db] = count(get_vals("SHOW TABLES IN " . idf_escape($db)));
		}
		return $return;
	}

	/** Get table status
	* @param bool $fast return only "Name", "Engine" and "Comment" fields
	* @return array<string, TableStatus>
	*/
	function table_status(string $name = "", bool $fast = false): array {
		$return = array();
		foreach (
			get_rows(
				$fast
				? "SELECT TABLE_NAME AS Name, ENGINE AS Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() " . ($name != "" ? "AND TABLE_NAME = " . q($name) : "ORDER BY Name")
				: "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
			) as $row
		) {
			if ($row["Engine"] == "InnoDB") {
				// ignore internal comment, unnecessary since MySQL 5.1.21
				$row["Comment"] = preg_replace('~(?:(.+); )?InnoDB free: .*~', '\1', $row["Comment"]);
			}
			if (!isset($row["Engine"])) {
				$row["Comment"] = "";
			}
			if ($name != "") {
				// MariaDB: Table name is returned as lowercase on macOS, so we fix it here.
				$row["Name"] = $name;
			}
			$return[$row["Name"]] = $row;
		}
		return $return;
	}

	/** Find out whether the identifier is view
	* @param TableStatus $table_status
	*/
	function is_view(array $table_status): bool {
		return $table_status["Engine"] === null;
	}

	/** Check if table supports foreign keys
	* @param TableStatus $table_status
	*/
	function fk_support(array $table_status): bool {
		return preg_match('~InnoDB|IBMDB2I' . (min_version(5.6) ? '|NDB' : '') . '~i', $table_status["Engine"]);
	}

	/** Get information about fields
	* @return Field[]
	*/
	function fields(string $table): array {
		$maria = (connection()->flavor == 'maria');
		$return = array();
		foreach (get_rows("SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = " . q($table) . " ORDER BY ORDINAL_POSITION") as $row) {
			$field = $row["COLUMN_NAME"];
			$type = $row["COLUMN_TYPE"];
			$generation = $row["GENERATION_EXPRESSION"];
			$extra = $row["EXTRA"];
			// https://mariadb.com/kb/en/library/show-columns/, https://github.com/vrana/adminer/pull/359#pullrequestreview-276677186
			preg_match('~^(VIRTUAL|PERSISTENT|STORED)~', $extra, $generated);
			preg_match('~^([^( ]+)(?:\((.+)\))?( unsigned)?( zerofill)?$~', $type, $match_type);
			$default = $row["COLUMN_DEFAULT"];
			if ($default != "") {
				$is_text = preg_match('~text|json~', $match_type[1]);
				if (!$maria && $is_text) {
					// default value a'b of text column is stored as _utf8mb4\'a\\\'b\' in MySQL
					$default = preg_replace("~^(_\w+)?('.*')$~", '\2', stripslashes($default));
				}
				if ($maria || $is_text) {
					$default = ($default == "NULL" ? null : preg_replace_callback("~^'(.*)'$~", function ($match) {
						return stripslashes(str_replace("''", "'", $match[1]));
					}, $default));
				}
				if (!$maria && preg_match('~binary~', $match_type[1]) && preg_match('~^0x(\w*)$~', $default, $match)) {
					$default = pack("H*", $match[1]);
				}
			}
			$return[$field] = array(
				"field" => $field,
				"full_type" => $type,
				"type" => $match_type[1],
				"length" => $match_type[2],
				"unsigned" => ltrim($match_type[3] . $match_type[4]),
				"default" => ($generated
					? ($maria ? $generation : stripslashes($generation))
					: $default
				),
				"null" => ($row["IS_NULLABLE"] == "YES"),
				"auto_increment" => ($extra == "auto_increment"),
				"on_update" => (preg_match('~\bon update (\w+)~i', $extra, $match) ? $match[1] : ""), //! available since MySQL 5.1.23
				"collation" => $row["COLLATION_NAME"],
				"privileges" => array_flip(explode(",", "$row[PRIVILEGES],where,order")),
				"comment" => $row["COLUMN_COMMENT"],
				"primary" => ($row["COLUMN_KEY"] == "PRI"),
				"generated" => ($generated[1] == "PERSISTENT" ? "STORED" : $generated[1]),
			);
		}
		return $return;
	}

	/** Get table indexes
	* @return Index[]
	*/
	function indexes(string $table, ?Db $connection2 = null): array {
		$return = array();
		foreach (get_rows("SHOW INDEX FROM " . table($table), $connection2) as $row) {
			$name = $row["Key_name"];
			$return[$name]["type"] = ($name == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? ($row["Index_type"] == "SPATIAL" ? "SPATIAL" : "INDEX") : "UNIQUE")));
			$return[$name]["columns"][] = $row["Column_name"];
			$return[$name]["lengths"][] = ($row["Index_type"] == "SPATIAL" ? null : $row["Sub_part"]);
			$return[$name]["descs"][] = null;
			$return[$name]["algorithm"] = $row["Index_type"];
		}
		return $return;
	}

	/** Get foreign keys in table
	* @return ForeignKey[]
	*/
	function foreign_keys(string $table): array {
		static $pattern = '(?:`(?:[^`]|``)+`|"(?:[^"]|"")+")';
		$return = array();
		$create_table = get_val("SHOW CREATE TABLE " . table($table), 1);
		if ($create_table) {
			preg_match_all(
				"~CONSTRAINT ($pattern) FOREIGN KEY ?\\(((?:$pattern,? ?)+)\\) REFERENCES ($pattern)(?:\\.($pattern))? \\(((?:$pattern,? ?)+)\\)(?: ON DELETE (" . driver()->onActions . "))?(?: ON UPDATE (" . driver()->onActions . "))?~",
				$create_table,
				$matches,
				PREG_SET_ORDER
			);
			foreach ($matches as $match) {
				preg_match_all("~$pattern~", $match[2], $source);
				preg_match_all("~$pattern~", $match[5], $target);
				$return[idf_unescape($match[1])] = array(
					"db" => idf_unescape($match[4] != "" ? $match[3] : $match[4]),
					"table" => idf_unescape($match[4] != "" ? $match[4] : $match[3]),
					"source" => array_map('Adminer\idf_unescape', $source[0]),
					"target" => array_map('Adminer\idf_unescape', $target[0]),
					"on_delete" => ($match[6] ?: "RESTRICT"),
					"on_update" => ($match[7] ?: "RESTRICT"),
				);
			}
		}
		return $return;
	}

	/** Get view SELECT
	* @return array{select:string}
	*/
	function view(string $name): array {
		return array("select" => preg_replace('~^(?:[^`]|`[^`]*`)*\s+AS\s+~isU', '', get_val("SHOW CREATE VIEW " . table($name), 1)));
	}

	/** Get sorted grouped list of collations
	* @return string[][]
	*/
	function collations(): array {
		$return = array();
		foreach (get_rows("SHOW COLLATION") as $row) {
			if ($row["Default"]) {
				$return[$row["Charset"]][-1] = $row["Collation"];
			} else {
				$return[$row["Charset"]][] = $row["Collation"];
			}
		}
		ksort($return);
		foreach ($return as $key => $val) {
			sort($return[$key]);
		}
		return $return;
	}

	/** Find out if database is information_schema */
	function information_schema(?string $db): bool {
		return ($db == "information_schema")
			|| (min_version(5.5) && $db == "performance_schema");
	}

	/** Get escaped error message */
	function error(): string {
		return h(preg_replace('~^You have an error.*syntax to use~U', "Syntax error", connection()->error));
	}

	/** Create database
	* @return Result
	*/
	function create_database(string $db, string $collation) {
		return queries("CREATE DATABASE " . idf_escape($db) . ($collation ? " COLLATE " . q($collation) : ""));
	}

	/** Drop databases
	* @param list<string> $databases
	*/
	function drop_databases(array $databases): bool {
		$return = apply_queries("DROP DATABASE", $databases, 'Adminer\idf_escape');
		restart_session();
		set_session("dbs", null);
		return $return;
	}

	/** Rename database from DB
	* @param string $name new name
	*/
	function rename_database(string $name, string $collation): bool {
		$return = false;
		if (create_database($name, $collation)) {
			$tables = array();
			$views = array();
			foreach (tables_list() as $table => $type) {
				if ($type == 'VIEW') {
					$views[] = $table;
				} else {
					$tables[] = $table;
				}
			}
			$return = (!$tables && !$views) || move_tables($tables, $views, $name);
			drop_databases($return ? array(DB) : array());
		}
		return $return;
	}

	/** Generate modifier for auto increment column */
	function auto_increment(): string {
		$auto_increment_index = " PRIMARY KEY";
		// don't overwrite primary key by auto_increment
		if ($_GET["create"] != "" && $_POST["auto_increment_col"]) {
			foreach (indexes($_GET["create"]) as $index) {
				if (in_array($_POST["fields"][$_POST["auto_increment_col"]]["orig"], $index["columns"], true)) {
					$auto_increment_index = "";
					break;
				}
				if ($index["type"] == "PRIMARY") {
					$auto_increment_index = " UNIQUE";
				}
			}
		}
		return " AUTO_INCREMENT$auto_increment_index";
	}

	/** Run commands to create or alter table
	* @param string $table "" to create
	* @param string $name new name
	* @param list<array{string, list<string>, string}> $fields of [$orig, $process_field, $after]
	* @param string[] $foreign
	* @param numeric-string|'' $auto_increment
	* @param ?Partitions $partitioning null means remove partitioning
	* @return Result|bool
	*/
	function alter_table(string $table, string $name, array $fields, array $foreign, ?string $comment, string $engine, string $collation, string $auto_increment, ?array $partitioning) {
		$alter = array();
		foreach ($fields as $field) {
			if ($field[1]) {
				$default = $field[1][3];
				if (preg_match('~ GENERATED~', $default)) {
					// swap default and null
					$field[1][3] = (connection()->flavor == 'maria' ? "" : $field[1][2]); // MariaDB doesn't support NULL on virtual columns
					$field[1][2] = $default;
				}
				$alter[] = ($table != "" ? ($field[0] != "" ? "CHANGE " . idf_escape($field[0]) : "ADD") : " ") . " " . implode($field[1]) . ($table != "" ? $field[2] : "");
			} else {
				$alter[] = "DROP " . idf_escape($field[0]);
			}
		}
		$alter = array_merge($alter, $foreign);
		$status = ($comment !== null ? " COMMENT=" . q($comment) : "")
			. ($engine ? " ENGINE=" . q($engine) : "")
			. ($collation ? " COLLATE " . q($collation) : "")
			. ($auto_increment != "" ? " AUTO_INCREMENT=$auto_increment" : "")
		;

		if ($partitioning) {
			$partitions = array();
			if ($partitioning["partition_by"] == 'RANGE' || $partitioning["partition_by"] == 'LIST') {
				foreach ($partitioning["partition_names"] as $key => $val) {
					$value = $partitioning["partition_values"][$key];
					$partitions[] = "\n  PARTITION " . idf_escape($val) . " VALUES " . ($partitioning["partition_by"] == 'RANGE' ? "LESS THAN" : "IN") . ($value != "" ? " ($value)" : " MAXVALUE"); //! SQL injection
				}
			}
			// $partitioning["partition"] can be expression, not only column
			$status .= "\nPARTITION BY $partitioning[partition_by]($partitioning[partition])";
			if ($partitions) {
				$status .= " (" . implode(",", $partitions) . "\n)";
			} elseif ($partitioning["partitions"]) {
				$status .= " PARTITIONS " . (+$partitioning["partitions"]);
			}
		} elseif ($partitioning === null) {
			$status .= "\nREMOVE PARTITIONING";
		}

		if ($table == "") {
			return queries("CREATE TABLE " . table($name) . " (\n" . implode(",\n", $alter) . "\n)$status");
		}
		if ($table != $name) {
			$alter[] = "RENAME TO " . table($name);
		}
		if ($status) {
			$alter[] = ltrim($status);
		}
		return ($alter ? queries("ALTER TABLE " . table($table) . "\n" . implode(",\n", $alter)) : true);
	}

	/** Run commands to alter indexes
	* @param string $table escaped table name
	* @param list<array{string, string, 'DROP'|list<string>, 3?: string, 4?: string}> $alter of ["index type", "name", ["column definition", ...], "algorithm", "condition"] or ["index type", "name", "DROP"]
	* @return Result|bool
	*/
	function alter_indexes(string $table, $alter) {
		$changes = array();
		foreach ($alter as $val) {
			$changes[] = ($val[2] == "DROP"
				? "\nDROP INDEX " . idf_escape($val[1])
				: "\nADD $val[0] " . ($val[0] == "PRIMARY" ? "KEY " : "") . ($val[1] != "" ? idf_escape($val[1]) . " " : "") . "(" . implode(", ", $val[2]) . ")"
			);
		}
		return queries("ALTER TABLE " . table($table) . implode(",", $changes));
	}

	/** Run commands to truncate tables
	* @param list<string> $tables
	*/
	function truncate_tables(array $tables): bool {
		return apply_queries("TRUNCATE TABLE", $tables);
	}

	/** Drop views
	* @param list<string> $views
	* @return Result|bool
	*/
	function drop_views(array $views) {
		return queries("DROP VIEW " . implode(", ", array_map('Adminer\table', $views)));
	}

	/** Drop tables
	* @param list<string> $tables
	* @return Result|bool
	*/
	function drop_tables(array $tables) {
		return queries("DROP TABLE " . implode(", ", array_map('Adminer\table', $tables)));
	}

	/** Move tables to other schema
	* @param list<string> $tables
	* @param list<string> $views
	*/
	function move_tables(array $tables, array $views, string $target): bool {
		$rename = array();
		foreach ($tables as $table) {
			$rename[] = table($table) . " TO " . idf_escape($target) . "." . table($table);
		}
		if (!$rename || queries("RENAME TABLE " . implode(", ", $rename))) {
			$definitions = array();
			foreach ($views as $table) {
				$definitions[table($table)] = view($table);
			}
			connection()->select_db($target);
			$db = idf_escape(DB);
			foreach ($definitions as $name => $view) {
				if (!queries("CREATE VIEW $name AS " . str_replace(" $db.", " ", $view["select"])) || !queries("DROP VIEW $db.$name")) {
					return false;
				}
			}
			return true;
		}
		//! move triggers
		return false;
	}

	/** Copy tables to other schema
	* @param list<string> $tables
	* @param list<string> $views
	*/
	function copy_tables(array $tables, array $views, string $target): bool {
		queries("SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'");
		foreach ($tables as $table) {
			$name = ($target == DB ? table("copy_$table") : idf_escape($target) . "." . table($table));
			if (
				($_POST["overwrite"] && !queries("\nDROP TABLE IF EXISTS $name"))
				|| !queries("CREATE TABLE $name LIKE " . table($table))
				|| !queries("INSERT INTO $name SELECT * FROM " . table($table))
			) {
				return false;
			}
			foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\"))) as $row) {
				$trigger = $row["Trigger"];
				if (!queries("CREATE TRIGGER " . ($target == DB ? idf_escape("copy_$trigger") : idf_escape($target) . "." . idf_escape($trigger)) . " $row[Timing] $row[Event] ON $name FOR EACH ROW\n$row[Statement];")) {
					return false;
				}
			}
		}
		foreach ($views as $table) {
			$name = ($target == DB ? table("copy_$table") : idf_escape($target) . "." . table($table));
			$view = view($table);
			if (
				($_POST["overwrite"] && !queries("DROP VIEW IF EXISTS $name"))
				|| !queries("CREATE VIEW $name AS $view[select]") //! USE to avoid db.table
			) {
				return false;
			}
		}
		return true;
	}

	/** Get information about trigger
	* @param string $name trigger name
	* @return Trigger
	*/
	function trigger(string $name, string $table): array {
		if ($name == "") {
			return array();
		}
		$rows = get_rows("SHOW TRIGGERS WHERE `Trigger` = " . q($name));
		return reset($rows);
	}

	/** Get defined triggers
	* @return array{string, string}[]
	*/
	function triggers(string $table): array {
		$return = array();
		foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\"))) as $row) {
			$return[$row["Trigger"]] = array($row["Timing"], $row["Event"]);
		}
		return $return;
	}

	/** Get trigger options
	* @return array{Timing: list<string>, Event: list<string>, Type: list<string>}
	*/
	function trigger_options(): array {
		return array(
			"Timing" => array("BEFORE", "AFTER"),
			"Event" => array("INSERT", "UPDATE", "DELETE"),
			"Type" => array("FOR EACH ROW"),
		);
	}

	/** Get information about stored routine
	* @param 'FUNCTION'|'PROCEDURE' $type
	* @return Routine
	*/
	function routine(string $name, string $type): array {
		$fields = get_rows("SELECT
	PARAMETER_NAME field,
	DATA_TYPE type,
	CHARACTER_MAXIMUM_LENGTH length,
	REGEXP_REPLACE(DTD_IDENTIFIER, '^[^ ]+ ', '') `unsigned`,
	1 `null`,
	DTD_IDENTIFIER full_type,
	PARAMETER_MODE `inout`,
	CHARACTER_SET_NAME collation
FROM information_schema.PARAMETERS
WHERE SPECIFIC_SCHEMA = DATABASE() AND ROUTINE_TYPE = '$type' AND SPECIFIC_NAME = " . q($name) . "
ORDER BY ORDINAL_POSITION");
		$return = connection()->query("SELECT ROUTINE_COMMENT comment, ROUTINE_DEFINITION definition, 'SQL' language
FROM information_schema.ROUTINES
WHERE ROUTINE_SCHEMA = DATABASE() AND ROUTINE_TYPE = '$type' AND ROUTINE_NAME = " . q($name))->fetch_assoc();
		if ($fields && $fields[0]['field'] == '') {
			$return['returns'] = array_shift($fields);
		}
		$return['fields'] = $fields;
		/** @phpstan-var Routine */
		return $return;
	}

	/** Get list of routines
	* @return list<string[]> ["SPECIFIC_NAME" => , "ROUTINE_NAME" => , "ROUTINE_TYPE" => , "DTD_IDENTIFIER" => ]
	*/
	function routines(): array {
		return get_rows("SELECT SPECIFIC_NAME, ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = DATABASE()");
	}

	/** Get list of available routine languages
	* @return list<string>
	*/
	function routine_languages(): array {
		return array(); // "SQL" not required
	}

	/** Get routine signature
	* @param Routine $row
	*/
	function routine_id(string $name, array $row): string {
		return idf_escape($name);
	}

	/** Get last auto increment ID
	* @param Result|bool $result
	*/
	function last_id($result): string {
		return get_val("SELECT LAST_INSERT_ID()"); // mysql_insert_id() truncates bigint
	}

	/** Explain select
	* @return Result
	*/
	function explain(Db $connection, string $query) {
		return $connection->query("EXPLAIN " . (min_version(5.1) && !min_version(5.7) ? "PARTITIONS " : "") . $query);
	}

	/** Get approximate number of rows
	* @param TableStatus $table_status
	* @param list<string> $where
	* @return numeric-string|null null if approximate number can't be retrieved
	*/
	function found_rows(array $table_status, array $where) {
		return ($where || $table_status["Engine"] != "InnoDB" ? null : $table_status["Rows"]);
	}

	/** Get SQL command to create table */
	function create_sql(string $table, ?bool $auto_increment, string $style): string {
		$return = get_val("SHOW CREATE TABLE " . table($table), 1);
		if (!$auto_increment) {
			$return = preg_replace('~ AUTO_INCREMENT=\d+~', '', $return); //! skip comments
		}
		return $return;
	}

	/** Get SQL command to truncate table */
	function truncate_sql(string $table): string {
		return "TRUNCATE " . table($table);
	}

	/** Get SQL command to change database */
	function use_sql(string $database, string $style = ""): string {
		$name = idf_escape($database);
		$return = "";
		if (preg_match('~CREATE~', $style) && ($create = get_val("SHOW CREATE DATABASE $name", 1))) {
			set_utf8mb4($create);
			if ($style == "DROP+CREATE") {
				$return = "DROP DATABASE IF EXISTS $name;\n";
			}
			$return .= "$create;\n";
		}
		return $return . "USE $name";
	}

	/** Get SQL commands to create triggers */
	function trigger_sql(string $table): string {
		$return = "";
		foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\")), null, "-- ") as $row) {
			$return .= "\nCREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n";
		}
		return $return;
	}

	/** Get server variables
	* @return list<string[]> [[$name, $value]]
	*/
	function show_variables(): array {
		return get_rows("SHOW VARIABLES");
	}

	/** Get status variables
	* @return list<string[]> [[$name, $value]]
	*/
	function show_status(): array {
		return get_rows("SHOW STATUS");
	}

	/** Get process list
	* @return list<string[]> [$row]
	*/
	function process_list(): array {
		return get_rows("SHOW FULL PROCESSLIST");
	}

	/** Convert field in select and edit
	* @param Field $field
	* @return string|void
	*/
	function convert_field(array $field) {
		if (preg_match("~binary~", $field["type"])) {
			return "HEX(" . idf_escape($field["field"]) . ")";
		}
		if ($field["type"] == "bit") {
			return "BIN(" . idf_escape($field["field"]) . " + 0)"; // + 0 is required outside MySQLnd
		}
		if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
			return (min_version(8) ? "ST_" : "") . "AsWKT(" . idf_escape($field["field"]) . ")";
		}
	}

	/** Convert value in edit after applying functions back
	* @param Field $field
	* @param string $return SQL expression
	*/
	function unconvert_field(array $field, string $return): string {
		if (preg_match("~binary~", $field["type"])) {
			$return = "UNHEX($return)";
		}
		if ($field["type"] == "bit") {
			$return = "CONVERT(b$return, UNSIGNED)";
		}
		if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
			$prefix = (min_version(8) ? "ST_" : "");
			$return = $prefix . "GeomFromText($return, $prefix" . "SRID($field[field]))";
		}
		return $return;
	}

	/** Check whether a feature is supported
	* @param literal-string $feature check|comment|columns|copy|database|descidx|drop_col|dump|event|indexes|kill|materializedview
	* |move_col|privileges|procedure|processlist|routine|scheme|sequence|sql|status|table|trigger|type|variables|view|view_trigger
	*/
	function support(string $feature): bool {
		return preg_match(
			'~^(comment|columns|copy|database|drop_col|dump|indexes|kill|privileges|move_col|procedure|processlist|routine|sql|status|table|trigger|variables|view'
				. (min_version(5.1) ? '|event' : '')
				. (min_version(8) ? '|descidx' : '')
				. (min_version('8.0.16', '10.2.1') ? '|check' : '')
				. ')$~',
			$feature
		);
	}

	/** Kill a process
	* @param numeric-string $id
	* @return Result|bool
	*/
	function kill_process(string $id) {
		return queries("KILL " . number($id));
	}

	/** Return query to get connection ID */
	function connection_id(): string {
		return "SELECT CONNECTION_ID()";
	}

	/** Get maximum number of connections
	* @return numeric-string
	*/
	function max_connections(): string {
		return get_val("SELECT @@max_connections");
	}

	// Not used is MySQL but checked in compile.php:

	/** Get user defined types
	* @return string[] [$id => $name]
	*/
	function types(): array {
		return array();
	}

	/** Get values of user defined type */
	function type_values(int $id): string {
		return "";
	}

	/** Get existing schemas
	* @return list<string>
	*/
	function schemas(): array {
		return array();
	}

	/** Get current schema */
	function get_schema(): string {
		return "";
	}

	/** Set current schema
	*/
	function set_schema(string $schema, ?Db $connection2 = null): bool {
		return true;
	}
}


================================================
FILE: adminer/drivers/oracle.inc.php
================================================
<?php
namespace Adminer;

add_driver("oracle", "Oracle (beta)");

if (isset($_GET["oracle"])) {
	define('Adminer\DRIVER', "oracle");

	if (extension_loaded("oci8") && $_GET["ext"] != "pdo") {
		class Db extends SqlDb {
			public $extension = "oci8";
			public $_current_db;
			private $link;

			function _error($errno, $error) {
				if (ini_bool("html_errors")) {
					$error = html_entity_decode(strip_tags($error));
				}
				$error = preg_replace('~^[^:]*: ~', '', $error);
				$this->error = $error;
			}

			function attach(string $server, string $username, string $password): string {
				$this->link = @oci_new_connect($username, $password, $server, "AL32UTF8");
				if ($this->link) {
					$this->server_info = oci_server_version($this->link);
					return '';
				}
				$error = oci_error();
				return $error["message"];
			}

			function quote(string $string): string {
				return "'" . str_replace("'", "''", $string) . "'";
			}

			function select_db(string $database) {
				$this->_current_db = $database;
				return true;
			}

			function query(string $query, bool $unbuffered = false) {
				$result = oci_parse($this->link, $query);
				$this->error = "";
				if (!$result) {
					$error = oci_error($this->link);
					$this->errno = $error["code"];
					$this->error = $error["message"];
					return false;
				}
				set_error_handler(array($this, '_error'));
				$return = @oci_execute($result);
				restore_error_handler();
				if ($return) {
					if (oci_num_fields($result)) {
						return new Result($result);
					}
					$this->affected_rows = oci_num_rows($result);
					oci_free_statement($result);
				}
				return $return;
			}

			function timeout(int $ms): bool {
				return oci_set_call_timeout($this->link, $ms);
			}
		}

		class Result {
			public $num_rows;
			private $result, $offset = 1;

			function __construct($result) {
				$this->result = $result;
			}

			private function convert($row) {
				foreach ((array) $row as $key => $val) {
					if (is_a($val, 'OCILob') || is_a($val, 'OCI-Lob')) {
						$row[$key] = $val->load();
					}
				}
				return $row;
			}

			function fetch_assoc() {
				return $this->convert(oci_fetch_assoc($this->result));
			}

			function fetch_row() {
				return $this->convert(oci_fetch_row($this->result));
			}

			function fetch_field(): \stdClass {
				$column = $this->offset++;
				$return = new \stdClass;
				$return->name = oci_field_name($this->result, $column);
				$return->type = oci_field_type($this->result, $column); //! map to MySQL numbers
				$return->charsetnr = (preg_match("~raw|blob|bfile~", $return->type) ? 63 : 0); // 63 - binary
				return $return;
			}

			function __destruct() {
				oci_free_statement($this->result);
			}
		}

	} elseif (extension_loaded("pdo_oci")) {
		class Db extends PdoDb {
			public $extension = "PDO_OCI";
			public $_current_db;

			function attach(string $server, string $username, string $password): string {
				return $this->dsn("oci:dbname=//$server;charset=AL32UTF8", $username, $password);
			}

			function select_db(string $database) {
				$this->_current_db = $database;
				return true;
			}
		}

	}



	class Driver extends SqlDriver {
		static $extensions = array("OCI8", "PDO_OCI");
		static $jush = "oracle";

		public $insertFunctions = array( //! no parentheses
			"date" => "current_date",
			"timestamp" => "current_timestamp",
		);
		public $editFunctions = array(
			"number|float|double" => "+/-",
			"date|timestamp" => "+ interval/- interval",
			"char|clob" => "||",
		);

		public $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL");
		public $functions = array("length", "lower", "round", "upper");
		public $grouping = array("avg", "count", "count distinct", "max", "min", "sum");

		function __construct(Db $connection) {
			parent::__construct($connection);
			$this->types = array(
				lang('Numbers') => array("number" => 38, "binary_float" => 12, "binary_double" => 21),
				lang('Date and time') => array("date" => 10, "timestamp" => 29, "interval year" => 12, "interval day" => 28), //! year(), day() to second()
				lang('Strings') => array("char" => 2000, "varchar2" => 4000, "nchar" => 2000, "nvarchar2" => 4000, "clob" => 4294967295, "nclob" => 4294967295),
				lang('Binary') => array("raw" => 2000, "long raw" => 2147483648, "blob" => 4294967295, "bfile" => 4294967296),
			);
		}

		//! support empty $set in insert()

		function begin() {
			return true; // automatic start
		}

		function insertUpdate(string $table, array $rows, array $primary) {
			foreach ($rows as $set) {
				$update = array();
				$where = array();
				foreach ($set as $key => $val) {
					$update[] = "$key = $val";
					if (isset($primary[idf_unescape($key)])) {
						$where[] = "$key = $val";
					}
				}
				if (
					!(($where && queries("UPDATE " . table($table) . " SET " . implode(", ", $update) . " WHERE " . implode(" AND ", $where)) && $this->conn->affected_rows)
					|| queries("INSERT INTO " . table($table) . " (" . implode(", ", array_keys($set)) . ") VALUES (" . implode(", ", $set) . ")"))
				) {
					return false;
				}
			}
			return true;
		}

		function hasCStyleEscapes(): bool {
			return true;
		}
	}



	function idf_escape($idf) {
		return '"' . str_replace('"', '""', $idf) . '"';
	}

	function table($idf) {
		return idf_escape($idf);
	}

	function get_databases($flush) {
		return get_vals(
			"SELECT DISTINCT tablespace_name FROM (
SELECT tablespace_name FROM user_tablespaces
UNION SELECT tablespace_name FROM all_tables WHERE tablespace_name IS NOT NULL
)
ORDER BY 1"
		);
	}

	function limit($query, $where, $limit, $offset = 0, $separator = " ") {
		return ($offset ? " * FROM (SELECT t.*, rownum AS rnum FROM (SELECT $query$where) t WHERE rownum <= " . ($limit + $offset) . ") WHERE rnum > $offset"
			: ($limit ? " * FROM (SELECT $query$where) WHERE rownum <= " . ($limit + $offset)
			: " $query$where"
		));
	}

	function limit1($table, $query, $where, $separator = "\n") {
		return " $query$where"; //! limit
	}

	function db_collation($db, $collations) {
		return get_val("SELECT value FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET'"); //! respect $db
	}

	function logged_user() {
		return get_val("SELECT USER FROM DUAL");
	}

	function get_current_db() {
		$db = connection()->_current_db ?: DB;
		unset(connection()->_current_db);
		return $db;
	}

	function where_owner($prefix, $owner = "owner") {
		if (!$_GET["ns"]) {
			return '';
		}
		return "$prefix$owner = sys_context('USERENV', 'CURRENT_SCHEMA')";
	}

	function views_table($columns) {
		$owner = where_owner('');
		return "(SELECT $columns FROM all_views WHERE " . ($owner ?: "rownum < 0") . ")";
	}

	function tables_list() {
		$view = views_table("view_name");
		$owner = where_owner(" AND ");
		return get_key_vals(
			"SELECT table_name, 'table' FROM all_tables WHERE tablespace_name = " . q(DB) . "$owner
UNION SELECT view_name, 'view' FROM $view
ORDER BY 1"
		); //! views don't have schema
	}

	function count_tables($databases) {
		$return = array();
		foreach ($databases as $db) {
			$return[$db] = get_val("SELECT COUNT(*) FROM all_tables WHERE tablespace_name = " . q($db));
		}
		return $return;
	}

	function table_status($name = "") {
		$return = array();
		$search = q($name);
		$db = get_current_db();
		$view = views_table("view_name");
		$owner = where_owner(" AND ");
		foreach (
			get_rows('SELECT table_name "Name", \'table\' "Engine", avg_row_len * num_rows "Data_length", num_rows "Rows" FROM all_tables WHERE tablespace_name = ' . q($db) . $owner . ($name != "" ? " AND table_name = $search" : "") . "
UNION SELECT view_name, 'view', 0, 0 FROM $view" . ($name != "" ? " WHERE view_name = $search" : "") . "
ORDER BY 1") as $row
		) {
			$return[$row["Name"]] = $row;
		}
		return $return;
	}

	function is_view($table_status) {
		return $table_status["Engine"] == "view";
	}

	function fk_support($table_status) {
		return true;
	}

	function fields($table) {
		$return = array();
		$owner = where_owner(" AND ");
		foreach (get_rows("SELECT * FROM all_tab_columns WHERE table_name = " . q($table) . "$owner ORDER BY column_id") as $row) {
			$type = $row["DATA_TYPE"];
			$length = "$row[DATA_PRECISION],$row[DATA_SCALE]";
			if ($length == ",") {
				$length = $row["CHAR_COL_DECL_LENGTH"];
			} //! int
			$return[$row["COLUMN_NAME"]] = array(
				"field" => $row["COLUMN_NAME"],
				"full_type" => $type . ($length ? "($length)" : ""),
				"type" => strtolower($type),
				"length" => $length,
				"default" => $row["DATA_DEFAULT"],
				"null" => ($row["NULLABLE"] == "Y"),
				//! "auto_increment" => false,
				//! "collation" => $row["CHARACTER_SET_NAME"],
				"privileges" => array("insert" => 1, "select" => 1, "update" => 1, "where" => 1, "order" => 1),
				//! "comment" => $row["Comment"],
				//! "primary" => ($row["Key"] == "PRI"),
			);
		}
		return $return;
	}

	function indexes($table, $connection2 = null) {
		$return = array();
		$owner = where_owner(" AND ", "aic.table_owner");
		foreach (
			get_rows("SELECT aic.*, ac.constraint_type, atc.data_default
FROM all_ind_columns aic
LEFT JOIN all_constraints ac ON aic.index_name = ac.constraint_name AND aic.table_name = ac.table_name AND aic.index_owner = ac.owner
LEFT JOIN all_tab_cols atc ON aic.column_name = atc.column_name AND aic.table_name = atc.table_name AND aic.index_owner = atc.owner
WHERE aic.table_name = " . q($table) . "$owner
ORDER BY ac.constraint_type, aic.column_position", $connection2) as $row
		) {
			$index_name = $row["INDEX_NAME"];
			$column_name = $row["DATA_DEFAULT"];
			$column_name = ($column_name ? trim($column_name, '"') : $row["COLUMN_NAME"]); // trim - possibly wrapped in quotes but never contains quotes inside
			$return[$index_name]["type"] = ($row["CONSTRAINT_TYPE"] == "P" ? "PRIMARY" : ($row["CONSTRAINT_TYPE"] == "U" ? "UNIQUE" : "INDEX"));
			$return[$index_name]["columns"][] = $column_name;
			$return[$index_name]["lengths"][] = ($row["CHAR_LENGTH"] && $row["CHAR_LENGTH"] != $row["COLUMN_LENGTH"] ? $row["CHAR_LENGTH"] : null);
			$return[$index_name]["descs"][] = ($row["DESCEND"] && $row["DESCEND"] == "DESC" ? '1' : null);
		}
		return $return;
	}

	function view($name) {
		$view = views_table("view_name, text");
		$rows = get_rows('SELECT text "select" FROM ' . $view . ' WHERE view_name = ' . q($name));
		return reset($rows);
	}

	function collations() {
		return array(); //!
	}

	function information_schema($db) {
		return get_schema() == "INFORMATION_SCHEMA";
	}

	function error() {
		return h(connection()->error); //! highlight sqltext from offset
	}

	function explain($connection, $query) {
		$connection->query("EXPLAIN PLAN FOR $query");
		return $connection->query("SELECT * FROM plan_table");
	}

	function found_rows($table_status, $where) {
	}

	function auto_increment() {
		return "";
	}

	function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
		$alter = $drop = array();
		$orig_fields = ($table ? fields($table) : array());
		foreach ($fields as $field) {
			$val = $field[1];
			if ($val && $field[0] != "" && idf_escape($field[0]) != $val[0]) {
				queries("ALTER TABLE " . table($table) . " RENAME COLUMN " . idf_escape($field[0]) . " TO $val[0]");
			}
			$orig_field = $orig_fields[$field[0]];
			if ($val && $orig_field) {
				$old = process_field($orig_field, $orig_field);
				if ($val[2] == $old[2]) {
					$val[2] = "";
				}
			}
			if ($val) {
				$alter[] = ($table != "" ? ($field[0] != "" ? "MODIFY (" : "ADD (") : "  ") . implode($val) . ($table != "" ? ")" : ""); //! error with name change only
			} else {
				$drop[] = idf_escape($field[0]);
			}
		}
		if ($table == "") {
			return queries("CREATE TABLE " . table($name) . " (\n" . implode(",\n", $alter) . "\n)");
		}
		return (!$alter || queries("ALTER TABLE " . table($table) . "\n" . implode("\n", $alter)))
			&& (!$drop || queries("ALTER TABLE " . table($table) . " DROP (" . implode(", ", $drop) . ")"))
			&& ($table == $name || queries("ALTER TABLE " . table($table) . " RENAME TO " . table($name)))
		;
	}

	function alter_indexes($table, $alter) {
		$drop = array();
		$queries = array();
		foreach ($alter as $val) {
			if ($val[0] != "INDEX") {
				$val[2] = preg_replace('~ DESC$~', '', $val[2]);
				$create = ($val[2] == "DROP"
					? "\nDROP CONSTRAINT " . idf_escape($val[1])
					: "\nADD" . ($val[1] != "" ? " CONSTRAINT " . idf_escape($val[1]) : "") . " $val[0] " . ($val[0] == "PRIMARY" ? "KEY " : "") . "(" . implode(", ", $val[2]) . ")"
				);
				array_unshift($queries, "ALTER TABLE " . table($table) . $create);
			} elseif ($val[2] == "DROP") {
				$drop[] = idf_escape($val[1]);
			} else {
				$queries[] = "CREATE INDEX " . idf_escape($val[1] != "" ? $val[1] : uniqid($table . "_")) . " ON " . table($table) . " (" . implode(", ", $val[2]) . ")";
			}
		}
		if ($drop) {
			array_unshift($queries, "DROP INDEX " . implode(", ", $drop));
		}
		foreach ($queries as $query) {
			if (!queries($query)) {
				return false;
			}
		}
		return true;
	}

	function foreign_keys($table) {
		$return = array();
		$query = "SELECT c_list.CONSTRAINT_NAME as NAME,
c_src.COLUMN_NAME as SRC_COLUMN,
c_dest.OWNER as DEST_DB,
c_dest.TABLE_NAME as DEST_TABLE,
c_dest.COLUMN_NAME as DEST_COLUMN,
c_list.DELETE_RULE as ON_DELETE
FROM ALL_CONSTRAINTS c_list, ALL_CONS_COLUMNS c_src, ALL_CONS_COLUMNS c_dest
WHERE c_list.CONSTRAINT_NAME = c_src.CONSTRAINT_NAME
AND c_list.R_CONSTRAINT_NAME = c_dest.CONSTRAINT_NAME
AND c_list.CONSTRAINT_TYPE = 'R'
AND c_src.TABLE_NAME = " . q($table);
		foreach (get_rows($query) as $row) {
			$return[$row['NAME']] = array(
				"db" => $row['DEST_DB'],
				"table" => $row['DEST_TABLE'],
				"source" => array($row['SRC_COLUMN']),
				"target" => array($row['DEST_COLUMN']),
				"on_delete" => $row['ON_DELETE'],
				"on_update" => null,
			);
		}
		return $return;
	}

	function truncate_tables($tables) {
		return apply_queries("TRUNCATE TABLE", $tables);
	}

	function drop_views($views) {
		return apply_queries("DROP VIEW", $views);
	}

	function drop_tables($tables) {
		return apply_queries("DROP TABLE", $tables);
	}

	function last_id($result) {
		return 0; //!
	}

	function schemas() {
		$return = get_vals("SELECT DISTINCT owner FROM dba_segments WHERE owner IN (SELECT username FROM dba_users WHERE default_tablespace NOT IN ('SYSTEM','SYSAUX')) ORDER BY 1");
		return ($return ?: get_vals("SELECT DISTINCT owner FROM all_tables WHERE tablespace_name = " . q(DB) . " ORDER BY 1"));
	}

	function get_schema() {
		return get_val("SELECT sys_context('USERENV', 'SESSION_USER') FROM dual");
	}

	function set_schema($scheme, $connection2 = null) {
		if (!$connection2) {
			$connection2 = connection();
		}
		return $connection2->query("ALTER SESSION SET CURRENT_SCHEMA = " . idf_escape($scheme));
	}

	function show_variables() {
		return get_rows('SELECT name, display_value FROM v$parameter');
	}

	function show_status() {
		$return = array();
		$rows = get_rows('SELECT * FROM v$instance');
		foreach (reset($rows) as $key => $val) {
			$return[] = array($key, $val);
		}
		return $return;
	}

	function process_list() {
		return get_rows('SELECT
	sess.process AS "process",
	sess.username AS "user",
	sess.schemaname AS "schema",
	sess.status AS "status",
	sess.wait_class AS "wait_class",
	sess.seconds_in_wait AS "seconds_in_wait",
	sql.sql_text AS "sql_text",
	sess.machine AS "machine",
	sess.port AS "port"
FROM v$session sess LEFT OUTER JOIN v$sql sql
ON sql.sql_id = sess.sql_id
WHERE sess.type = \'USER\'
ORDER BY PROCESS
');
	}

	function convert_field($field) {
	}

	function unconvert_field($field, $return) {
		return $return;
	}

	function support($feature) {
		return preg_match('~^(columns|database|drop_col|indexes|descidx|processlist|scheme|sql|status|table|variables|view)$~', $feature); //!
	}
}


================================================
FILE: adminer/drivers/pgsql.inc.php
================================================
<?php
namespace Adminer;

add_driver("pgsql", "PostgreSQL");

if (isset($_GET["pgsql"])) {
	define('Adminer\DRIVER', "pgsql");

	if (extension_loaded("pgsql") && $_GET["ext"] != "pdo") {
		class PgsqlDb extends SqlDb {
			public $extension = "PgSQL";
			public $timeout = 0;
			private $link, $string, $database = true;

			function _error($errno, $error) {
				if (ini_bool("html_errors")) {
					$error = html_entity_decode(strip_tags($error));
				}
				$error = preg_replace('~^[^:]*: ~', '', $error);
				$this->error = $error;
			}

			function attach(string $server, string $username, string $password): string {
				$db = adminer()->database();
				set_error_handler(array($this, '_error'));
				list($host, $port) = host_port(addcslashes($server, "'\\"));
				$this->string = "host='$host'" . ($port ? " port='$port'" : "") . " user='" . addcslashes($username, "'\\") . "' password='" . addcslashes($password, "'\\") . "'";
				$ssl = adminer()->connectSsl();
				if (isset($ssl["mode"])) {
					$this->string .= " sslmode='" . $ssl["mode"] . "'";
				}
				$this->link = @pg_connect("$this->string dbname='" . ($db != "" ? addcslashes($db, "'\\") : "postgres") . "'", PGSQL_CONNECT_FORCE_NEW);
				if (!$this->link && $db != "") {
					// try to connect directly with database for performance
					$this->database = false;
					$this->link = @pg_connect("$this->string dbname='postgres'", PGSQL_CONNECT_FORCE_NEW);
				}
				restore_error_handler();
				if ($this->link) {
					pg_set_client_encoding($this->link, "UTF8");
				}
				return ($this->link ? '' : $this->error);
			}

			function quote(string $string): string {
				return (function_exists('pg_escape_literal')
					? pg_escape_literal($this->link, $string) // available since PHP 5.4.4
					: "'" . pg_escape_string($this->link, $string) . "'"
				);
			}

			function value(?string $val, array $field): ?string {
				return ($field["type"] == "bytea" && $val !== null ? pg_unescape_bytea($val) : $val);
			}

			function select_db(string $database) {
				if ($database == adminer()->database()) {
					return $this->database;
				}
				$return = @pg_connect("$this->string dbname='" . addcslashes($database, "'\\") . "'", PGSQL_CONNECT_FORCE_NEW);
				if ($return) {
					$this->link = $return;
				}
				return $return;
			}

			function close() {
				$this->link = @pg_connect("$this->string dbname='postgres'");
			}

			function query(string $query, bool $unbuffered = false) {
				$result = @pg_query($this->link, $query);
				$this->error = "";
				if (!$result) {
					$this->error = pg_last_error($this->link);
					$return = false;
				} elseif (!pg_num_fields($result)) {
					$this->affected_rows = pg_affected_rows($result);
					$return = true;
				} else {
					$return = new Result($result);
				}
				if ($this->timeout) {
					$this->timeout = 0;
					$this->query("RESET statement_timeout");
				}
				return $return;
			}

			function warnings() {
				if (PHP_VERSION_ID >= 70100) {
					$return = implode("\n", pg_last_notice($this->link, 2)); // 2 - PGSQL_NOTICE_ALL
					pg_last_notice($this->link, 3); // 3 - PGSQL_NOTICE_CLEAR
				} else {
					$return = pg_last_notice($this->link);
				}
				return nl_br(h($return));
			}

			/** Copy from array into a table
			* @param list<string> $rows
			*/
			function copyFrom(string $table, array $rows): bool {
				$this->error = '';
				set_error_handler(function (int $errno, string $error): bool {
					$this->error = (ini_bool('html_errors') ? html_entity_decode($error) : $error);
					return true;
				});
				$return = pg_copy_from($this->link, $table, $rows);
				restore_error_handler();
				return $return;
			}
		}

		class Result {
			public $num_rows;
			private $result, $offset = 0;

			function __construct($result) {
				$this->result = $result;
				$this->num_rows = pg_num_rows($result);
			}

			function fetch_assoc() {
				return pg_fetch_assoc($this->result);
			}

			function fetch_row() {
				return pg_fetch_row($this->result);
			}

			function fetch_field(): \stdClass {
				$column = $this->offset++;
				$return = new \stdClass;
				$return->orgtable = pg_field_table($this->result, $column);
				$return->name = pg_field_name($this->result, $column);
				$type = pg_field_type($this->result, $column);
				$return->type = (preg_match(number_type(), $type) ? 0 : 15);
				$return->charsetnr = ($type == "bytea" ? 63 : 0); // 63 - binary
				return $return;
			}

			function __destruct() {
				pg_free_result($this->result);
			}
		}

	} elseif (extension_loaded("pdo_pgsql")) {
		class PgsqlDb extends PdoDb {
			public $extension = "PDO_PgSQL";
			public $timeout = 0;

			function attach(string $server, string $username, string $password): string {
				$db = adminer()->database();
				list($host, $port) = host_port(addcslashes($server, "'\\"));
				//! client_encoding is supported since 9.1, but we can't yet use min_version here
				$dsn = "pgsql:host='$host'" . ($port ? " port='$port'" : "") . " client_encoding=utf8 dbname='" . ($db != "" ? addcslashes($db, "'\\") : "postgres") . "'";
				$ssl = adminer()->connectSsl();
				if (isset($ssl["mode"])) {
					$dsn .= " sslmode='" . $ssl["mode"] . "'";
				}
				return $this->dsn($dsn, $username, $password);
			}

			function select_db(string $database) {
				return (adminer()->database() == $database);
			}

			function query(string $query, bool $unbuffered = false) {
				$return = parent::query($query, $unbuffered);
				if ($this->timeout) {
					$this->timeout = 0;
					parent::query("RESET statement_timeout");
				}
				return $return;
			}

			function warnings() {
				// not implemented in PDO_PgSQL as of PHP 7.2.1
			}

			function copyFrom(string $table, array $rows): bool {
				$return = $this->pdo->pgsqlCopyFromArray($table, $rows);
				$this->error = idx($this->pdo->errorInfo(), 2) ?: '';
				return $return;
			}

			function close() {
			}
		}

	}



	if (class_exists('Adminer\PgsqlDb')) {
		class Db extends PgsqlDb {
			function multi_query(string $query) {
				if (preg_match('~\bCOPY\s+(.+?)\s+FROM\s+stdin;\n?(.*)\n\\\\\.$~is', str_replace("\r\n", "\n", $query), $match)) { // no ^ to allow leading comments
					$rows = explode("\n", $match[2]);
					$this->affected_rows = count($rows);
					return $this->copyFrom($match[1], $rows);
				}
				return parent::multi_query($query);
			}
		}
	}



	class Driver extends SqlDriver {
		static $extensions = array("PgSQL", "PDO_PgSQL");
		static $jush = "pgsql";

		public $operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT ILIKE", "NOT IN", "IS NOT NULL", "SQL"); //! SQL - same-site CSRF
		public $functions = array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper");
		public $grouping = array("avg", "count", "count distinct", "max", "min", "sum");

		public string $nsOid = "(SELECT oid FROM pg_namespace WHERE nspname = current_schema())";

		static function connect(string $server, string $username, string $password) {
			$connection = parent::connect($server, $username, $password);
			if (is_string($connection)) {
				return $connection;
			}
			$version = get_val("SELECT version()", 0, $connection);
			$connection->flavor = (preg_match('~CockroachDB~', $version) ? 'cockroach' : '');
			$connection->server_info = preg_replace('~^\D*([\d.]+[-\w]*).*~', '\1', $version);
			if (min_version(9, 0, $connection)) {
				$connection->query("SET application_name = 'Adminer'");
			}
			if ($connection->flavor == 'cockroach') { // we don't use "PostgreSQL / CockroachDB" by default because it's too long
				add_driver(DRIVER, "CockroachDB");
			}
			return $connection;
		}

		function __construct(Db $connection) {
			parent::__construct($connection);
			$this->types = array( //! arrays
				lang('Numbers') => array("smallint" => 5, "integer" => 10, "bigint" => 19, "boolean" => 1, "numeric" => 0, "real" => 7, "double precision" => 16, "money" => 20),
				lang('Date and time') => array("date" => 13, "time" => 17, "timestamp" => 20, "timestamptz" => 21, "interval" => 0),
				lang('Strings') => array("character" => 0, "character varying" => 0, "text" => 0, "tsquery" => 0, "tsvector" => 0, "uuid" => 0, "xml" => 0),
				lang('Binary') => array("bit" => 0, "bit varying" => 0, "bytea" => 0),
				lang('Network') => array("cidr" => 43, "inet" => 43, "macaddr" => 17, "macaddr8" => 23, "txid_snapshot" => 0),
				lang('Geometry') => array("box" => 0, "circle" => 0, "line" => 0, "lseg" => 0, "path" => 0, "point" => 0, "polygon" => 0),
			);
			if (min_version(9.2, 0, $connection)) {
				$this->types[lang('Strings')]["json"] = 4294967295;
				if (min_version(9.4, 0, $connection)) {
					$this->types[lang('Strings')]["jsonb"] = 4294967295;
				}
			}
			$this->insertFunctions = array(
				"char" => "md5",
				"date|time" => "now",
			);
			$this->editFunctions = array(
				number_type() => "+/-",
				"date|time" => "+ interval/- interval", //! escape
				"char|text" => "||",
			);
			if (min_version(12, 0, $connection)) {
				$this->generated = array("STORED");
			}
			$this->partitionBy = array("RANGE", "LIST");
			if (!$connection->flavor) {
				$this->partitionBy[] = "HASH";
			}
		}

		function enumLength(array $field) {
			$enum = $this->types[lang('User types')][$field["type"]];
			return ($enum ? type_values($enum) : "");
		}

		function setUserTypes($types) {
			$this->types[lang('User types')] = array_flip($types);
		}

		function insertReturning(string $table): string {
			$auto_increment = array_filter(fields($table), function ($field) {
				return $field['auto_increment'];
			});
			return (count($auto_increment) == 1 ? " RETURNING " . idf_escape(key($auto_increment)) : "");
		}

		function insertUpdate(string $table, array $rows, array $primary) {
			foreach ($rows as $set) {
				$update = array();
				$where = array();
				foreach ($set as $key => $val) {
					$update[] = "$key = $val";
					if (isset($primary[idf_unescape($key)])) {
						$where[] = "$key = $val";
					}
				}
				if (
					!(($where && queries("UPDATE " . table($table) . " SET " . implode(", ", $update) . " WHERE " . implode(" AND ", $where)) && $this->conn->affected_rows)
					|| queries("INSERT INTO " . table($table) . " (" . implode(", ", array_keys($set)) . ") VALUES (" . implode(", ", $set) . ")"))
				) {
					return false;
				}
			}
			return true;
		}

		function slowQuery(string $query, int $timeout) {
			$this->conn->query("SET statement_timeout = " . (1000 * $timeout));
			$this->conn->timeout = 1000 * $timeout;
			return $query;
		}

		function convertSearch(string $idf, array $val, array $field): string {
			$textTypes = "char|text";
			if (strpos($val["op"], "LIKE") === false) {
				$textTypes .= "|date|time(stamp)?|boolean|uuid|inet|cidr|macaddr|" . number_type();
			}

			return (preg_match("~$textTypes~", $field["type"]) ? $idf : "CAST($idf AS text)");
		}

		function quoteBinary(string $s): string {
			return "'\\x" . bin2hex($s) . "'"; // available since PostgreSQL 8.1
		}

		function warnings() {
			return $this->conn->warnings();
		}

		function tableHelp(string $name, bool $is_view = false) {
			$links = array(
				"information_schema" => "infoschema",
				"pg_catalog" => ($is_view ? "view" : "catalog"),
			);
			$link = $links[$_GET["ns"]];
			if ($link) {
				return "$link-" . str_replace("_", "-", $name) . ".html";
			}
		}

		function inheritsFrom(string $table): array {
			return get_rows("SELECT relname AS table, nspname AS ns FROM pg_class JOIN pg_inherits ON inhparent = oid JOIN pg_namespace ON relnamespace = pg_namespace.oid WHERE inhrelid = " . $this->tableOid($table) . " ORDER BY 2, 1");
		}

		function inheritedTables(string $table): array {
			return get_rows("SELECT relname AS table, nspname AS ns FROM pg_inherits JOIN pg_class ON inhrelid = oid JOIN pg_namespace ON relnamespace = pg_namespace.oid WHERE inhparent = " . $this->tableOid($table) . " ORDER BY 2, 1");
		}

		function partitionsInfo(string $table): array {
			$row = (min_version(10) ? $this->conn->query("SELECT * FROM pg_partitioned_table WHERE partrelid = " . $this->tableOid($table))->fetch_assoc() : null);
			if ($row) {
				$attrs = get_vals("SELECT attname FROM pg_attribute WHERE attrelid = $row[partrelid] AND attnum IN (" . str_replace(" ", ", ", $row["partattrs"]) . ")"); //! ordering
				$by = array('h' => 'HASH', 'l' => 'LIST', 'r' => 'RANGE');
				return array(
					"partition_by" => $by[$row["partstrat"]],
					"partition" => implode(", ", array_map('Adminer\idf_escape', $attrs)),
				);
			}
			return array();
		}

		function tableOid(string $table): string {
			return "(SELECT oid FROM pg_class WHERE relnamespace = $this->nsOid AND relname = " . q($table) . " AND relkind IN ('r', 'm', 'v', 'f', 'p'))";
		}

		function indexAlgorithms(array $tableStatus): array {
			static $return = array();
			if (!$return) {
				$return = get_vals("SELECT amname FROM pg_am" . (min_version(9.6) ? " WHERE amtype = 'i'" : "") . " ORDER BY amname = '" . ($this->conn->flavor == 'cockroach' ? "prefix" : "btree") . "' DESC, amname");
			}
			return $return;
		}

		function supportsIndex(array $table_status): bool {
			// returns true for "materialized view"
			return $table_status["Engine"] != "view";
		}

		function hasCStyleEscapes(): bool {
			static $c_style;
			if ($c_style === null) {
				$c_style = (get_val("SHOW standard_conforming_strings", 0, $this->conn) == "off");
			}
			return $c_style;
		}
	}



	function idf_escape($idf) {
		return '"' . str_replace('"', '""', $idf) . '"';
	}

	function table($idf) {
		return idf_escape($idf);
	}

	function get_databases($flush) {
		return get_vals("SELECT datname FROM pg_database
WHERE datallowconn = TRUE AND has_database_privilege(datname, 'CONNECT')
ORDER BY datname");
	}

	function limit($query, $where, $limit, $offset = 0, $separator = " ") {
		return " $query$where" . ($limit ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
	}

	function limit1($table, $query, $where, $separator = "\n") {
		return (preg_match('~^INTO~', $query)
			? limit($query, $where, 1, 0, $separator)
			: " $query" . (is_view(table_status1($table)) ? $where : $separator . "WHERE ctid = (SELECT ctid FROM " . table($table) . $where . $separator . "LIMIT 1)")
		);
	}

	function db_collation($db, $collations) {
		return get_val("SELECT datcollate FROM pg_database WHERE datname = " . q($db));
	}

	function logged_user() {
		return get_val("SELECT user");
	}

	function tables_list() {
		$query = "SELECT table_name, table_type FROM information_schema.tables WHERE table_schema = current_schema()";
		if (support("materializedview")) {
			$query .= "
UNION ALL
SELECT matviewname, 'MATERIALIZED VIEW'
FROM pg_matviews
WHERE schemaname = current_schema()";
		}
		$query .= "
ORDER BY 1";
		return get_key_vals($query);
	}

	function count_tables($databases) {
		$return = array();
		foreach ($databases as $db) {
			if (connection()->select_db($db)) {
				$return[$db] = count(tables_list());
			}
		}
		return $return;
	}

	function table_status($name = "") {
		static $has_size;
		if ($has_size === null) {
			// https://github.com/cockroachdb/cockroach/issues/40391
			$has_size = get_val("SELECT 'pg_table_size'::regproc");
		}
		$return = array();
		foreach (
			get_rows("SELECT
	relname AS \"Name\",
	CASE relkind WHEN 'v' THEN 'view' WHEN 'm' THEN 'materialized view' ELSE 'table' END AS \"Engine\"" . ($has_size ? ",
	pg_table_size(c.oid) AS \"Data_length\",
	pg_indexes_size(c.oid) AS \"Index_length\"" : "") . ",
	obj_description(c.oid, 'pg_class') AS \"Comment\",
	" . (min_version(12) ? "''" : "CASE WHEN relhasoids THEN 'oid' ELSE '' END") . " AS \"Oid\",
	reltuples AS \"Rows\",
	" . (min_version(10) ? "relispartition::int AS partition," : "") . "
	current_schema() AS nspname
FROM pg_class c
WHERE relkind IN ('r', 'm', 'v', 'f', 'p')
AND relnamespace = " . driver()->nsOid . "
" . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname")) as $row //! Auto_increment
		) {
			$return[$row["Name"]] = $row;
		}
		return $return;
	}

	function is_view($table_status) {
		return in_array($table_status["Engine"], array("view", "materialized view"));
	}

	function fk_support($table_status) {
		return true;
	}

	function fields($table) {
		$return = array();
		$aliases = array(
			'timestamp without time zone' => 'timestamp',
			'timestamp with time zone' => 'timestamptz',
		);
		foreach (
			get_rows("SELECT
	a.attname AS field,
	format_type(a.atttypid, a.atttypmod) AS full_type,
	pg_get_expr(d.adbin, d.adrelid) AS default,
	a.attnotnull::int,
	i.indrelid AS primary,
	col_description(a.attrelid, a.attnum) AS comment" . (min_version(10) ? ",
	a.attidentity" . (min_version(12) ? ",
	a.attgenerated" : "") : "") . "
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_index i ON a.attrelid = i.indrelid AND a.attnum = ANY(i.indkey) AND i.indisprimary
WHERE a.attrelid = " . driver()->tableOid($table) . "
AND NOT a.attisdropped
AND a.attnum > 0
ORDER BY a.attnum") as $row
		) {
			//! collation
			preg_match('~([^([]+)(\((.*)\))?([a-z ]+)?((\[[0-9]*])*)$~', $row["full_type"], $match);
			list(, $type, $length, $row["length"], $addon, $array) = $match;
			$row["length"] .= $array;
			$check_type = $type . $addon;
			if (isset($aliases[$check_type])) {
				$row["type"] = $aliases[$check_type];
				$row["full_type"] = $row["type"] . $length . $array;
			} else {
				$row["type"] = $type;
				$row["full_type"] = $row["type"] . $length . $addon . $array;
			}
			if (in_array($row['attidentity'], array('a', 'd'))) {
				$row['default'] = 'GENERATED ' . ($row['attidentity'] == 'd' ? 'BY DEFAULT' : 'ALWAYS') . ' AS IDENTITY';
			}
			$row["generated"] = ($row["attgenerated"] == "s" ? "STORED" : "");
			$row["null"] = !$row["attnotnull"];
			$row["auto_increment"] = $row['attidentity'] || preg_match('~^nextval\(~i', $row["default"])
				|| preg_match('~^unique_rowid\(~', $row["default"]); // CockroachDB
			$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1, "where" => 1, "order" => 1);
			if (!$row['generated'] && preg_match('~(.+)::[^,)]+(.*)~', $row["default"], $match)) {
				$row["default"] = ($match[1] == "NULL" ? null : idf_unescape($match[1]) . $match[2]);
			}
			$return[$row["field"]] = $row;
		}
		return $return;
	}

	function indexes($table, $connection2 = null) {
		$connection2 = connection($connection2);
		$return = array();
		$table_oid = driver()->tableOid($table);
		$columns = get_key_vals("SELECT attnum, attname FROM pg_attribute WHERE attrelid = $table_oid AND attnum > 0", $connection2);
		foreach (
			get_rows("SELECT relname, indisunique::int, indisprimary::int, indkey, indoption, amname, pg_get_expr(indpred, indrelid, true) AS partial, pg_get_expr(indexprs, indrelid) AS indexpr
FROM pg_index
JOIN pg_class ON indexrelid = oid
JOIN pg_am ON pg_am.oid = pg_class.relam
WHERE indrelid = $table_oid
ORDER BY indisprimary DESC, indisunique DESC", $connection2) as $row
		) {
			$relname = $row["relname"];
			$return[$relname]["type"] = ($row["indisprimary"] ? "PRIMARY" : ($row["indisunique"] ? "UNIQUE" : "INDEX"));
			$return[$relname]["columns"] = array();
			$return[$relname]["descs"] = array();
			$return[$relname]["algorithm"] = $row["amname"];
			$return[$relname]["partial"] = $row["partial"];
			$indexpr = preg_split('~(?<=\)), (?=\()~', $row["indexpr"]); //! '), (' used in expression
			foreach (explode(" ", $row["indkey"]) as $indkey) {
				$return[$relname]["columns"][] = ($indkey ? $columns[$indkey] : array_shift($indexpr));
			}
			foreach (explode(" ", $row["indoption"]) as $indoption) {
				$return[$relname]["descs"][] = (intval($indoption) & 1 ? '1' : null); // 1 - INDOPTION_DESC
			}
			$return[$relname]["lengths"] = array();
		}
		return $return;
	}

	function foreign_keys($table) {
		$return = array();
		foreach (
			get_rows("SELECT conname, condeferrable::int AS deferrable, condeferred::int AS deferred, pg_get_constraintdef(oid) AS definition
FROM pg_constraint
WHERE conrelid = " . driver()->tableOid($table) . "
AND contype = 'f'::char
ORDER BY conkey, conname") as $row
		) {
			$row['deferrable'] = ($row['deferrable'] ? '' : 'NOT ') . 'DEFERRABLE' . ($row['deferred'] ? ' INITIALLY DEFERRED' : '');
			if (preg_match('~FOREIGN KEY\s*\((.+)\)\s*REFERENCES (.+)\((.+)\)(.*)$~iA', $row['definition'], $match)) {
				$row['source'] = array_map('Adminer\idf_unescape', array_map('trim', explode(',', $match[1])));
				if (preg_match('~^(("([^"]|"")+"|[^"]+)\.)?"?("([^"]|"")+"|[^"]+)$~', $match[2], $match2)) {
					$row['ns'] = idf_unescape($match2[2]);
					$row['table'] = idf_unescape($match2[4]);
				}
				$row['target'] = array_map('Adminer\idf_unescape', array_map('trim', explode(',', $match[3])));
				$row['on_delete'] = (preg_match("~ON DELETE (" . driver()->onActions . ")~", $match[4], $match2) ? $match2[1] : 'NO ACTION');
				$row['on_update'] = (preg_match("~ON UPDATE (" . driver()->onActions . ")~", $match[4], $match2) ? $match2[1] : 'NO ACTION');
				$return[$row['conname']] = $row;
			}
		}
		return $return;
	}

	function view($name) {
		return array("select" => trim(get_val("SELECT pg_get_viewdef(" . driver()->tableOid($name) . ")")));
	}

	function collations() {
		//! supported in CREATE DATABASE
		return array();
	}

	function information_schema($db) {
		return get_schema() == "information_schema";
	}

	function error() {
		$return = h(connection()->error);
		if (preg_match('~^(.*\n)?([^\n]*)\n( *)\^(\n.*)?$~s', $return, $match)) {
			$return = $match[1] . preg_replace('~((?:[^&]|&[^;]*;){' . strlen($match[3]) . '})(.*)~', '\1<b>\2</b>', $match[2]) . $match[4];
		}
		return nl_br($return);
	}

	function create_database($db, $collation) {
		return queries("CREATE DATABASE " . idf_escape($db) . ($collation ? " ENCODING " . idf_escape($collation) : ""));
	}

	function drop_databases($databases) {
		connection()->close();
		return apply_queries("DROP DATABASE", $databases, 'Adminer\idf_escape');
	}

	function rename_database($name, $collation) {
		connection()->close();
		return queries("ALTER DATABASE " . idf_escape(DB) . " RENAME TO " . idf_escape($name));
	}

	function auto_increment() {
		return "";
	}

	function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
		$alter = array();
		$queries = array();
		if ($table != "" && $table != $name) {
			$queries[] = "ALTER TABLE " . table($table) . " RENAME TO " . table($name);
		}
		$sequence = "";
		foreach ($fields as $field) {
			$column = idf_escape($field[0]);
			$val = $field[1];
			if (!$val) {
				$alter[] = "DROP $column";
			} else {
				$val5 = $val[5];
				unset($val[5]);
				if ($field[0] == "") {
					if (isset($val[6])) { // auto_increment
						$val[1] = ($val[1] == " bigint" ? " big" : ($val[1] == " smallint" ? " small" : " ")) . "serial";
					}
					$alter[] = ($table != "" ? "ADD " : "  ") . implode($val);
					if (isset($val[6])) {
						$alter[] = ($table != "" ? "ADD" : " ") . " PRIMARY KEY ($val[0])";
					}
				} else {
					if ($column != $val[0]) {
						$queries[] = "ALTER TABLE " . table($name) . " RENAME $column TO $val[0]";
					}
					$alter[] = "ALTER $column TYPE$val[1]";
					$sequence_name = $table . "_" . idf_unescape($val[0]) . "_seq";
					$alter[] = "ALTER $column " . ($val[3] ? "SET" . preg_replace('~GENERATED ALWAYS(.*) STORED~', 'EXPRESSION\1', $val[3])
						: (isset($val[6]) ? "SET DEFAULT nextval(" . q($sequence_name) . ")"
						: "DROP DEFAULT" //! change to DROP EXPRESSION with generated columns
					));
					if (isset($val[6])) {
						$sequence = "CREATE SEQUENCE IF NOT EXISTS " . idf_escape($sequence_name) . " OWNED BY " . idf_escape($table) . ".$val[0]";
					}
					$alter[] = "ALTER $column " . ($val[2] == " NULL" ? "DROP NOT" : "SET") . $val[2];
				}
				if ($field[0] != "" || $val5 != "") {
					$queries[] = "COMMENT ON COLUMN " . table($name) . ".$val[0] IS " . ($val5 != "" ? substr($val5, 9) : "''");
				}
			}
		}
		$alter = array_merge($alter, $foreign);
		if ($table == "") {
			$status = "";
			if ($partitioning) {
				$cockroach = (connection()->flavor == 'cockroach');
				$status = " PARTITION BY $partitioning[partition_by]($partitioning[partition])";
				if ($partitioning["partition_by"] == 'HASH') {
					$partitions = +$partitioning["partitions"];
					for ($i=0; $i < $partitions; $i++) {
						$queries[] = "CREATE TABLE " . idf_escape($name . "_$i") . " PARTITION OF " . idf_escape($name) . " FOR VALUES WITH (MODULUS $partitions, REMAINDER $i)";
					}
				} else {
					$prev = "MINVALUE";
					foreach ($partitioning["partition_names"] as $i => $val) {
						$value = $partitioning["partition_values"][$i];
						$partition = " VALUES " . ($partitioning["partition_by"] == 'LIST' ? "IN ($value)" : "FROM ($prev) TO ($value)");
						if ($cockroach) {
							$status .= ($i ? "," : " (") . "\n  PARTITION " . (preg_match('~^DEFAULT$~i', $val) ? $val : idf_escape($val)) . "$partition";
						} else {
							$queries[] = "CREATE TABLE " . idf_escape($name . "_$val") . " PARTITION OF " . idf_escape($name) . " FOR$partition";
						}
						$prev = $value;
					}
					$status .= ($cockroach ? "\n)" : "");
				}
			}
			array_unshift($queries, "CREATE TABLE " . table($name) . " (\n" . implode(",\n", $alter) . "\n)$status");
		} elseif ($alter) {
			array_unshift($queries, "ALTER TABLE " . table($table) . "\n" . implode(",\n", $alter));
		}
		if ($sequence) {
			array_unshift($queries, $sequence);
		}
		if ($comment !== null) {
			$queries[] = "COMMENT ON TABLE " . table($name) . " IS " . q($comment);
		}
		// if ($auto_increment != "") {
			//! $queries[] = "SELECT setval(pg_get_serial_sequence(" . q($name) . ", ), $auto_increment)";
		// }
		foreach ($queries as $query) {
			if (!queries($query)) {
				return false;
			}
		}
		return true;
	}

	function alter_indexes($table, $alter) {
		$create = array();
		$drop = array();
		$queries = array();
		foreach ($alter as $val) {
			if ($val[0] != "INDEX") {
				//! descending UNIQUE indexes result in syntax error
				$create[] = ($val[2] == "DROP"
					? "\nDROP CONSTRAINT " . idf_escape($val[1])
					: "\nADD" . ($val[1] != "" ? " CONSTRAINT " . idf_escape($val[1]) : "") . " $val[0] " . ($val[0] == "PRIMARY" ? "KEY " : "") . "(" . implode(", ", $val[2]) . ")"
				);
			} elseif ($val[2] == "DROP") {
				$drop[] = idf_escape($val[1]);
			} else {
				$queries[
Download .txt
gitextract_k5k2lsdc/

├── .editorconfig
├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   └── bug_report.md
│   └── workflows/
│       └── ci.yml
├── .gitignore
├── .gitmodules
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── SECURITY.md
├── adminer/
│   ├── call.inc.php
│   ├── check.inc.php
│   ├── create.inc.php
│   ├── database.inc.php
│   ├── db.inc.php
│   ├── designs.php
│   ├── download.inc.php
│   ├── drivers/
│   │   ├── mssql.inc.php
│   │   ├── mysql.inc.php
│   │   ├── oracle.inc.php
│   │   ├── pgsql.inc.php
│   │   └── sqlite.inc.php
│   ├── dump.inc.php
│   ├── edit.inc.php
│   ├── elastic.php
│   ├── event.inc.php
│   ├── file.inc.php
│   ├── foreign.inc.php
│   ├── include/
│   │   ├── adminer.inc.php
│   │   ├── auth.inc.php
│   │   ├── bootstrap.inc.php
│   │   ├── connect.inc.php
│   │   ├── coverage.inc.php
│   │   ├── db.inc.php
│   │   ├── design.inc.php
│   │   ├── driver.inc.php
│   │   ├── editing.inc.php
│   │   ├── errors.inc.php
│   │   ├── functions.inc.php
│   │   ├── html.inc.php
│   │   ├── lang.inc.php
│   │   ├── pdo.inc.php
│   │   ├── plugin.inc.php
│   │   ├── plugins.inc.php
│   │   ├── tmpfile.inc.php
│   │   ├── version.inc.php
│   │   └── xxtea.inc.php
│   ├── index.php
│   ├── indexes.inc.php
│   ├── lang/
│   │   ├── ar.inc.php
│   │   ├── bg.inc.php
│   │   ├── bn.inc.php
│   │   ├── bs.inc.php
│   │   ├── ca.inc.php
│   │   ├── cs.inc.php
│   │   ├── da.inc.php
│   │   ├── de.inc.php
│   │   ├── el.inc.php
│   │   ├── en.inc.php
│   │   ├── es.inc.php
│   │   ├── et.inc.php
│   │   ├── fa.inc.php
│   │   ├── fi.inc.php
│   │   ├── fr.inc.php
│   │   ├── gl.inc.php
│   │   ├── he.inc.php
│   │   ├── hi.inc.php
│   │   ├── hr.inc.php
│   │   ├── hu.inc.php
│   │   ├── id.inc.php
│   │   ├── it.inc.php
│   │   ├── ja.inc.php
│   │   ├── ka.inc.php
│   │   ├── ko.inc.php
│   │   ├── lt.inc.php
│   │   ├── lv.inc.php
│   │   ├── ms.inc.php
│   │   ├── nl.inc.php
│   │   ├── no.inc.php
│   │   ├── pl.inc.php
│   │   ├── pt-br.inc.php
│   │   ├── pt.inc.php
│   │   ├── ro.inc.php
│   │   ├── ru.inc.php
│   │   ├── sk.inc.php
│   │   ├── sl.inc.php
│   │   ├── sr.inc.php
│   │   ├── sv.inc.php
│   │   ├── ta.inc.php
│   │   ├── th.inc.php
│   │   ├── tr.inc.php
│   │   ├── uk.inc.php
│   │   ├── uz.inc.php
│   │   ├── vi.inc.php
│   │   ├── xx.inc.php
│   │   ├── zh-tw.inc.php
│   │   └── zh.inc.php
│   ├── privileges.inc.php
│   ├── procedure.inc.php
│   ├── processlist.inc.php
│   ├── schema.inc.php
│   ├── scheme.inc.php
│   ├── script.inc.php
│   ├── select.inc.php
│   ├── sequence.inc.php
│   ├── sql.inc.php
│   ├── sqlite.php
│   ├── static/
│   │   ├── dark.css
│   │   ├── default.css
│   │   ├── editing.js
│   │   └── functions.js
│   ├── table.inc.php
│   ├── trigger.inc.php
│   ├── type.inc.php
│   ├── user.inc.php
│   ├── variables.inc.php
│   └── view.inc.php
├── compile.php
├── composer.json
├── coverage.php
├── designs/
│   ├── README.md
│   ├── adminer-dark/
│   │   ├── README.md
│   │   └── adminer-dark.css
│   ├── brade/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── bueltge/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── dracula/
│   │   ├── README.md
│   │   └── adminer-dark.css
│   ├── esterka/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── flat/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── galkaev/
│   │   ├── README.md
│   │   └── adminer-dark.css
│   ├── haeckel/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── hever/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── konya/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── lavender-light/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── lucas-sandery/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── mancave/
│   │   ├── README.md
│   │   └── adminer-dark.css
│   ├── mvt/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── nette/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── ng9/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── nicu/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── pappu687/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── paranoiq/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── pepa-linha/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── pokorny/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── price/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── rmsoft/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── rmsoft_blue/
│   │   ├── README.md
│   │   └── adminer.css
│   ├── rmsoft_blue-dark/
│   │   ├── README.md
│   │   └── adminer.css
│   └── win98/
│       ├── README.md
│       └── adminer.css
├── developing.md
├── editor/
│   ├── db.inc.php
│   ├── example.php
│   ├── include/
│   │   ├── adminer.inc.php
│   │   ├── connect.inc.php
│   │   └── editing.inc.php
│   ├── index.php
│   ├── script.inc.php
│   ├── sqlite.php
│   └── static/
│       └── editing.js
├── eslint.config.mjs
├── lang.php
├── phpcs.xml
├── phpstan.neon
├── plugins/
│   ├── README.md
│   ├── adminer.js.php
│   ├── backward-keys.php
│   ├── before-unload.php
│   ├── config.php
│   ├── dark-switcher.php
│   ├── database-hide.php
│   ├── designs.php
│   ├── drivers/
│   │   ├── README.md
│   │   ├── clickhouse.php
│   │   ├── elastic.php
│   │   ├── firebird.php
│   │   ├── igdb.php
│   │   ├── imap.php
│   │   ├── mongo.php
│   │   └── simpledb.php
│   ├── dump-alter.php
│   ├── dump-bz2.php
│   ├── dump-date.php
│   ├── dump-json.php
│   ├── dump-php.php
│   ├── dump-xml.php
│   ├── dump-zip.php
│   ├── edit-calendar.php
│   ├── edit-foreign.php
│   ├── edit-textarea.php
│   ├── editor-setup.php
│   ├── editor-views.php
│   ├── email-table.php
│   ├── enum-option.php
│   ├── file-upload.php
│   ├── foreign-system.php
│   ├── frames.php
│   ├── highlight-codemirror.php
│   ├── highlight-monaco.php
│   ├── highlight-prism.php
│   ├── json-column.php
│   ├── login-ip.php
│   ├── login-otp.php
│   ├── login-password-less.php
│   ├── login-servers.php
│   ├── login-ssl.php
│   ├── login-table.php
│   ├── master-slave.php
│   ├── menu-links.php
│   ├── pretty-json-column.php
│   ├── row-numbers.php
│   ├── select-email.php
│   ├── slugify.php
│   ├── sql-gemini.php
│   ├── sql-log.php
│   ├── table-indexes-structure.php
│   ├── table-structure.php
│   ├── tables-filter.php
│   ├── timeout.php
│   ├── tinymce.php
│   ├── translation.php
│   ├── version-github.php
│   └── version-noverify.php
├── tests/
│   ├── add-test.php
│   ├── cockroachdb.html
│   ├── elastic.html
│   ├── generate-pdo.php
│   ├── mariadb.html
│   ├── mssql.html
│   ├── mysql.html
│   ├── pgsql.html
│   ├── screenshots.html
│   ├── screenshots.php
│   └── sqlite.html
└── todo.txt
Download .txt
SYMBOL INDEX (1404 symbols across 92 files)

FILE: adminer/call.inc.php
  function pre_tr (line 101) | function pre_tr(string $s): string {

FILE: adminer/designs.php
  function adminer_object (line 2) | function adminer_object() {

FILE: adminer/drivers/mssql.inc.php
  class Db (line 16) | class Db extends SqlDb {
    method get_error (line 20) | private function get_error() {
    method attach (line 29) | function attach(string $server, string $username, string $password): s...
    method quote (line 53) | function quote(string $string): string {
    method select_db (line 58) | function select_db(string $database) {
    method query (line 62) | function query(string $query, bool $unbuffered = false) {
    method multi_query (line 72) | function multi_query(string $query) {
    method store_result (line 82) | function store_result($result = null) {
    method next_result (line 96) | function next_result(): bool {
    method attach (line 185) | function attach(string $server, string $username, string $password): s...
    method attach (line 195) | function attach(string $server, string $username, string $password): s...
  class Result (line 101) | class Result {
    method __construct (line 105) | function __construct($result) {
    method convert (line 110) | private function convert($row) {
    method fetch_assoc (line 120) | function fetch_assoc() {
    method fetch_row (line 124) | function fetch_row() {
    method fetch_field (line 128) | function fetch_field(): \stdClass {
    method seek (line 140) | function seek($offset) {
    method __destruct (line 146) | function __destruct() {
  function last_id (line 151) | function last_id($result) {
  function explain (line 155) | function explain($connection, $query) {
  class MssqlDb (line 163) | abstract class MssqlDb extends PdoDb {
    method select_db (line 164) | function select_db(string $database) {
    method lastInsertId (line 169) | function lastInsertId() {
  function last_id (line 174) | function last_id($result) {
  function explain (line 178) | function explain($connection, $query) {
  class Db (line 182) | class Db extends MssqlDb {
    method get_error (line 20) | private function get_error() {
    method attach (line 29) | function attach(string $server, string $username, string $password): s...
    method quote (line 53) | function quote(string $string): string {
    method select_db (line 58) | function select_db(string $database) {
    method query (line 62) | function query(string $query, bool $unbuffered = false) {
    method multi_query (line 72) | function multi_query(string $query) {
    method store_result (line 82) | function store_result($result = null) {
    method next_result (line 96) | function next_result(): bool {
    method attach (line 185) | function attach(string $server, string $username, string $password): s...
    method attach (line 195) | function attach(string $server, string $username, string $password): s...
  class Db (line 192) | class Db extends MssqlDb {
    method get_error (line 20) | private function get_error() {
    method attach (line 29) | function attach(string $server, string $username, string $password): s...
    method quote (line 53) | function quote(string $string): string {
    method select_db (line 58) | function select_db(string $database) {
    method query (line 62) | function query(string $query, bool $unbuffered = false) {
    method multi_query (line 72) | function multi_query(string $query) {
    method store_result (line 82) | function store_result($result = null) {
    method next_result (line 96) | function next_result(): bool {
    method attach (line 185) | function attach(string $server, string $username, string $password): s...
    method attach (line 195) | function attach(string $server, string $username, string $password): s...
  class Driver (line 204) | class Driver extends SqlDriver {
    method connect (line 220) | static function connect(string $server, string $username, string $pass...
    method __construct (line 227) | function __construct(Db $connection) {
    method insertUpdate (line 237) | function insertUpdate(string $table, array $rows, array $primary) {
    method begin (line 277) | function begin() {
    method tableHelp (line 281) | function tableHelp(string $name, bool $is_view = false) {
  function idf_escape (line 295) | function idf_escape($idf) {
  function table (line 299) | function table($idf) {
  function get_databases (line 303) | function get_databases($flush) {
  function limit (line 307) | function limit($query, $where, $limit, $offset = 0, $separator = " ") {
  function limit1 (line 311) | function limit1($table, $query, $where, $separator = "\n") {
  function db_collation (line 315) | function db_collation($db, $collations) {
  function logged_user (line 319) | function logged_user() {
  function tables_list (line 323) | function tables_list() {
  function count_tables (line 327) | function count_tables($databases) {
  function table_status (line 336) | function table_status($name = "") {
  function is_view (line 348) | function is_view($table_status) {
  function fk_support (line 352) | function fk_support($table_status) {
  function fields (line 356) | function fields($table) {
  function indexes (line 396) | function indexes($table, $connection2 = null) {
  function view (line 415) | function view($name) {
  function collations (line 419) | function collations() {
  function information_schema (line 427) | function information_schema($db) {
  function error (line 431) | function error() {
  function create_database (line 435) | function create_database($db, $collation) {
  function drop_databases (line 439) | function drop_databases($databases) {
  function rename_database (line 443) | function rename_database($name, $collation) {
  function auto_increment (line 451) | function auto_increment() {
  function alter_table (line 455) | function alter_table($table, $name, $fields, $foreign, $comment, $engine...
  function alter_indexes (line 524) | function alter_indexes($table, $alter) {
  function found_rows (line 548) | function found_rows($table_status, $where) {
  function foreign_keys (line 551) | function foreign_keys($table) {
  function truncate_tables (line 567) | function truncate_tables($tables) {
  function drop_views (line 571) | function drop_views($views) {
  function drop_tables (line 575) | function drop_tables($tables) {
  function move_tables (line 579) | function move_tables($tables, $views, $target) {
  function trigger (line 583) | function trigger($name, $table) {
  function triggers (line 603) | function triggers($table) {
  function trigger_options (line 618) | function trigger_options() {
  function schemas (line 626) | function schemas() {
  function get_schema (line 630) | function get_schema() {
  function set_schema (line 637) | function set_schema($schema) {
  function create_sql (line 642) | function create_sql($table, $auto_increment, $style) {
  function foreign_keys_sql (line 672) | function foreign_keys_sql($table) {
  function truncate_sql (line 680) | function truncate_sql($table) {
  function use_sql (line 684) | function use_sql($database, $style = "") {
  function trigger_sql (line 688) | function trigger_sql($table) {
  function convert_field (line 696) | function convert_field($field) {
  function unconvert_field (line 699) | function unconvert_field($field, $return) {
  function support (line 703) | function support($feature) {

FILE: adminer/drivers/mysql.inc.php
  class Db (line 11) | class Db extends \MySQLi {
    method __construct (line 15) | function __construct() {
    method attach (line 19) | function attach(string $server, string $username, string $password): s...
    method set_charset (line 39) | function set_charset($charset) {
    method next_result (line 48) | function next_result() {
    method quote (line 52) | function quote(string $string): string {
    method attach (line 61) | function attach(string $server, string $username, string $password): s...
    method set_charset (line 80) | function set_charset(string $charset): bool {
    method quote (line 91) | function quote(string $string): string {
    method select_db (line 95) | function select_db(string $database) {
    method query (line 99) | function query(string $query, bool $unbuffered = false) {
    method attach (line 161) | function attach(string $server, string $username, string $password): s...
    method set_charset (line 187) | function set_charset($charset) {
    method select_db (line 191) | function select_db(string $database) {
    method query (line 196) | function query(string $query, bool $unbuffered = false) {
  class Db (line 58) | class Db extends SqlDb {
    method __construct (line 15) | function __construct() {
    method attach (line 19) | function attach(string $server, string $username, string $password): s...
    method set_charset (line 39) | function set_charset($charset) {
    method next_result (line 48) | function next_result() {
    method quote (line 52) | function quote(string $string): string {
    method attach (line 61) | function attach(string $server, string $username, string $password): s...
    method set_charset (line 80) | function set_charset(string $charset): bool {
    method quote (line 91) | function quote(string $string): string {
    method select_db (line 95) | function select_db(string $database) {
    method query (line 99) | function query(string $query, bool $unbuffered = false) {
    method attach (line 161) | function attach(string $server, string $username, string $password): s...
    method set_charset (line 187) | function set_charset($charset) {
    method select_db (line 191) | function select_db(string $database) {
    method query (line 196) | function query(string $query, bool $unbuffered = false) {
  class Result (line 116) | class Result {
    method __construct (line 122) | function __construct($result) {
    method fetch_assoc (line 130) | function fetch_assoc() {
    method fetch_row (line 137) | function fetch_row() {
    method fetch_field (line 144) | function fetch_field(): \stdClass {
    method __destruct (line 152) | function __destruct() {
  class Db (line 158) | class Db extends PdoDb {
    method __construct (line 15) | function __construct() {
    method attach (line 19) | function attach(string $server, string $username, string $password): s...
    method set_charset (line 39) | function set_charset($charset) {
    method next_result (line 48) | function next_result() {
    method quote (line 52) | function quote(string $string): string {
    method attach (line 61) | function attach(string $server, string $username, string $password): s...
    method set_charset (line 80) | function set_charset(string $charset): bool {
    method quote (line 91) | function quote(string $string): string {
    method select_db (line 95) | function select_db(string $database) {
    method query (line 99) | function query(string $query, bool $unbuffered = false) {
    method attach (line 161) | function attach(string $server, string $username, string $password): s...
    method set_charset (line 187) | function set_charset($charset) {
    method select_db (line 191) | function select_db(string $database) {
    method query (line 196) | function query(string $query, bool $unbuffered = false) {
  class Driver (line 206) | class Driver extends SqlDriver {
    method connect (line 215) | static function connect(string $server, string $username, string $pass...
    method __construct (line 230) | function __construct(Db $connection) {
    method unconvertFunction (line 270) | function unconvertFunction(array $field) {
    method insert (line 277) | function insert(string $table, array $set) {
    method insertUpdate (line 281) | function insertUpdate(string $table, array $rows, array $primary) {
    method slowQuery (line 306) | function slowQuery(string $query, int $timeout) {
    method convertSearch (line 316) | function convertSearch(string $idf, array $val, array $field): string {
    method warnings (line 323) | function warnings() {
    method tableHelp (line 332) | function tableHelp(string $name, bool $is_view = false) {
    method partitionsInfo (line 342) | function partitionsInfo(string $table): array {
    method hasCStyleEscapes (line 353) | function hasCStyleEscapes(): bool {
    method engines (line 362) | function engines(): array {
    method indexAlgorithms (line 372) | function indexAlgorithms(array $tableStatus): array {
  function idf_escape (line 380) | function idf_escape(string $idf): string {
  function table (line 385) | function table(string $idf): string {
  function get_databases (line 392) | function get_databases(bool $flush): array {
  function limit (line 409) | function limit(string $query, string $where, int $limit, int $offset = 0...
  function limit1 (line 416) | function limit1(string $table, string $query, string $where, string $sep...
  function db_collation (line 423) | function db_collation(string $db, array $collations): ?string {
  function logged_user (line 436) | function logged_user(): string {
  function tables_list (line 443) | function tables_list(): array {
  function count_tables (line 451) | function count_tables(array $databases): array {
  function table_status (line 463) | function table_status(string $name = "", bool $fast = false): array {
  function is_view (line 491) | function is_view(array $table_status): bool {
  function fk_support (line 498) | function fk_support(array $table_status): bool {
  function fields (line 505) | function fields(string $table): array {
  function indexes (line 558) | function indexes(string $table, ?Db $connection2 = null): array {
  function foreign_keys (line 574) | function foreign_keys(string $table): array {
  function view (line 604) | function view(string $name): array {
  function collations (line 611) | function collations(): array {
  function information_schema (line 628) | function information_schema(?string $db): bool {
  function error (line 634) | function error(): string {
  function create_database (line 641) | function create_database(string $db, string $collation) {
  function drop_databases (line 648) | function drop_databases(array $databases): bool {
  function rename_database (line 658) | function rename_database(string $name, string $collation): bool {
  function auto_increment (line 677) | function auto_increment(): string {
  function alter_table (line 703) | function alter_table(string $table, string $name, array $fields, array $...
  function alter_indexes (line 761) | function alter_indexes(string $table, $alter) {
  function truncate_tables (line 775) | function truncate_tables(array $tables): bool {
  function drop_views (line 783) | function drop_views(array $views) {
  function drop_tables (line 791) | function drop_tables(array $tables) {
  function move_tables (line 799) | function move_tables(array $tables, array $views, string $target): bool {
  function copy_tables (line 826) | function copy_tables(array $tables, array $views, string $target): bool {
  function trigger (line 861) | function trigger(string $name, string $table): array {
  function triggers (line 872) | function triggers(string $table): array {
  function trigger_options (line 883) | function trigger_options(): array {
  function routine (line 895) | function routine(string $name, string $type): array {
  function routines (line 922) | function routines(): array {
  function routine_languages (line 929) | function routine_languages(): array {
  function routine_id (line 936) | function routine_id(string $name, array $row): string {
  function last_id (line 943) | function last_id($result): string {
  function explain (line 950) | function explain(Db $connection, string $query) {
  function found_rows (line 959) | function found_rows(array $table_status, array $where) {
  function create_sql (line 964) | function create_sql(string $table, ?bool $auto_increment, string $style)...
  function truncate_sql (line 973) | function truncate_sql(string $table): string {
  function use_sql (line 978) | function use_sql(string $database, string $style = ""): string {
  function trigger_sql (line 992) | function trigger_sql(string $table): string {
  function show_variables (line 1003) | function show_variables(): array {
  function show_status (line 1010) | function show_status(): array {
  function process_list (line 1017) | function process_list(): array {
  function convert_field (line 1025) | function convert_field(array $field) {
  function unconvert_field (line 1041) | function unconvert_field(array $field, string $return): string {
  function support (line 1059) | function support(string $feature): bool {
  function kill_process (line 1074) | function kill_process(string $id) {
  function connection_id (line 1079) | function connection_id(): string {
  function max_connections (line 1086) | function max_connections(): string {
  function types (line 1095) | function types(): array {
  function type_values (line 1100) | function type_values(int $id): string {
  function schemas (line 1107) | function schemas(): array {
  function get_schema (line 1112) | function get_schema(): string {
  function set_schema (line 1118) | function set_schema(string $schema, ?Db $connection2 = null): bool {

FILE: adminer/drivers/oracle.inc.php
  class Db (line 10) | class Db extends SqlDb {
    method _error (line 15) | function _error($errno, $error) {
    method attach (line 23) | function attach(string $server, string $username, string $password): s...
    method quote (line 33) | function quote(string $string): string {
    method select_db (line 37) | function select_db(string $database) {
    method query (line 42) | function query(string $query, bool $unbuffered = false) {
    method timeout (line 64) | function timeout(int $ms): bool {
    method attach (line 113) | function attach(string $server, string $username, string $password): s...
    method select_db (line 117) | function select_db(string $database) {
  class Result (line 69) | class Result {
    method __construct (line 73) | function __construct($result) {
    method convert (line 77) | private function convert($row) {
    method fetch_assoc (line 86) | function fetch_assoc() {
    method fetch_row (line 90) | function fetch_row() {
    method fetch_field (line 94) | function fetch_field(): \stdClass {
    method __destruct (line 103) | function __destruct() {
  class Db (line 109) | class Db extends PdoDb {
    method _error (line 15) | function _error($errno, $error) {
    method attach (line 23) | function attach(string $server, string $username, string $password): s...
    method quote (line 33) | function quote(string $string): string {
    method select_db (line 37) | function select_db(string $database) {
    method query (line 42) | function query(string $query, bool $unbuffered = false) {
    method timeout (line 64) | function timeout(int $ms): bool {
    method attach (line 113) | function attach(string $server, string $username, string $password): s...
    method select_db (line 117) | function select_db(string $database) {
  class Driver (line 127) | class Driver extends SqlDriver {
    method __construct (line 145) | function __construct(Db $connection) {
    method begin (line 157) | function begin() {
    method insertUpdate (line 161) | function insertUpdate(string $table, array $rows, array $primary) {
    method hasCStyleEscapes (line 181) | function hasCStyleEscapes(): bool {
  function idf_escape (line 188) | function idf_escape($idf) {
  function table (line 192) | function table($idf) {
  function get_databases (line 196) | function get_databases($flush) {
  function limit (line 206) | function limit($query, $where, $limit, $offset = 0, $separator = " ") {
  function limit1 (line 213) | function limit1($table, $query, $where, $separator = "\n") {
  function db_collation (line 217) | function db_collation($db, $collations) {
  function logged_user (line 221) | function logged_user() {
  function get_current_db (line 225) | function get_current_db() {
  function where_owner (line 231) | function where_owner($prefix, $owner = "owner") {
  function views_table (line 238) | function views_table($columns) {
  function tables_list (line 243) | function tables_list() {
  function count_tables (line 253) | function count_tables($databases) {
  function table_status (line 261) | function table_status($name = "") {
  function is_view (line 277) | function is_view($table_status) {
  function fk_support (line 281) | function fk_support($table_status) {
  function fields (line 285) | function fields($table) {
  function indexes (line 311) | function indexes($table, $connection2 = null) {
  function view (line 333) | function view($name) {
  function collations (line 339) | function collations() {
  function information_schema (line 343) | function information_schema($db) {
  function error (line 347) | function error() {
  function explain (line 351) | function explain($connection, $query) {
  function found_rows (line 356) | function found_rows($table_status, $where) {
  function auto_increment (line 359) | function auto_increment() {
  function alter_table (line 363) | function alter_table($table, $name, $fields, $foreign, $comment, $engine...
  function alter_indexes (line 393) | function alter_indexes($table, $alter) {
  function foreign_keys (line 421) | function foreign_keys($table) {
  function truncate_tables (line 447) | function truncate_tables($tables) {
  function drop_views (line 451) | function drop_views($views) {
  function drop_tables (line 455) | function drop_tables($tables) {
  function last_id (line 459) | function last_id($result) {
  function schemas (line 463) | function schemas() {
  function get_schema (line 468) | function get_schema() {
  function set_schema (line 472) | function set_schema($scheme, $connection2 = null) {
  function show_variables (line 479) | function show_variables() {
  function show_status (line 483) | function show_status() {
  function process_list (line 492) | function process_list() {
  function convert_field (line 510) | function convert_field($field) {
  function unconvert_field (line 513) | function unconvert_field($field, $return) {
  function support (line 517) | function support($feature) {

FILE: adminer/drivers/pgsql.inc.php
  class PgsqlDb (line 10) | class PgsqlDb extends SqlDb {
    method _error (line 15) | function _error($errno, $error) {
    method attach (line 23) | function attach(string $server, string $username, string $password): s...
    method quote (line 45) | function quote(string $string): string {
    method value (line 52) | function value(?string $val, array $field): ?string {
    method select_db (line 56) | function select_db(string $database) {
    method close (line 67) | function close() {
    method query (line 71) | function query(string $query, bool $unbuffered = false) {
    method warnings (line 90) | function warnings() {
    method copyFrom (line 103) | function copyFrom(string $table, array $rows): bool {
    method attach (line 153) | function attach(string $server, string $username, string $password): s...
    method select_db (line 165) | function select_db(string $database) {
    method query (line 169) | function query(string $query, bool $unbuffered = false) {
    method warnings (line 178) | function warnings() {
    method copyFrom (line 182) | function copyFrom(string $table, array $rows): bool {
    method close (line 188) | function close() {
  class Result (line 115) | class Result {
    method __construct (line 119) | function __construct($result) {
    method fetch_assoc (line 124) | function fetch_assoc() {
    method fetch_row (line 128) | function fetch_row() {
    method fetch_field (line 132) | function fetch_field(): \stdClass {
    method __destruct (line 143) | function __destruct() {
  class PgsqlDb (line 149) | class PgsqlDb extends PdoDb {
    method _error (line 15) | function _error($errno, $error) {
    method attach (line 23) | function attach(string $server, string $username, string $password): s...
    method quote (line 45) | function quote(string $string): string {
    method value (line 52) | function value(?string $val, array $field): ?string {
    method select_db (line 56) | function select_db(string $database) {
    method close (line 67) | function close() {
    method query (line 71) | function query(string $query, bool $unbuffered = false) {
    method warnings (line 90) | function warnings() {
    method copyFrom (line 103) | function copyFrom(string $table, array $rows): bool {
    method attach (line 153) | function attach(string $server, string $username, string $password): s...
    method select_db (line 165) | function select_db(string $database) {
    method query (line 169) | function query(string $query, bool $unbuffered = false) {
    method warnings (line 178) | function warnings() {
    method copyFrom (line 182) | function copyFrom(string $table, array $rows): bool {
    method close (line 188) | function close() {
  class Db (line 197) | class Db extends PgsqlDb {
    method multi_query (line 198) | function multi_query(string $query) {
  class Driver (line 211) | class Driver extends SqlDriver {
    method connect (line 221) | static function connect(string $server, string $username, string $pass...
    method __construct (line 238) | function __construct(Db $connection) {
    method enumLength (line 272) | function enumLength(array $field) {
    method setUserTypes (line 277) | function setUserTypes($types) {
    method insertReturning (line 281) | function insertReturning(string $table): string {
    method insertUpdate (line 288) | function insertUpdate(string $table, array $rows, array $primary) {
    method slowQuery (line 308) | function slowQuery(string $query, int $timeout) {
    method convertSearch (line 314) | function convertSearch(string $idf, array $val, array $field): string {
    method quoteBinary (line 323) | function quoteBinary(string $s): string {
    method warnings (line 327) | function warnings() {
    method tableHelp (line 331) | function tableHelp(string $name, bool $is_view = false) {
    method inheritsFrom (line 342) | function inheritsFrom(string $table): array {
    method inheritedTables (line 346) | function inheritedTables(string $table): array {
    method partitionsInfo (line 350) | function partitionsInfo(string $table): array {
    method tableOid (line 363) | function tableOid(string $table): string {
    method indexAlgorithms (line 367) | function indexAlgorithms(array $tableStatus): array {
    method supportsIndex (line 375) | function supportsIndex(array $table_status): bool {
    method hasCStyleEscapes (line 380) | function hasCStyleEscapes(): bool {
  function idf_escape (line 391) | function idf_escape($idf) {
  function table (line 395) | function table($idf) {
  function get_databases (line 399) | function get_databases($flush) {
  function limit (line 405) | function limit($query, $where, $limit, $offset = 0, $separator = " ") {
  function limit1 (line 409) | function limit1($table, $query, $where, $separator = "\n") {
  function db_collation (line 416) | function db_collation($db, $collations) {
  function logged_user (line 420) | function logged_user() {
  function tables_list (line 424) | function tables_list() {
  function count_tables (line 438) | function count_tables($databases) {
  function table_status (line 448) | function table_status($name = "") {
  function is_view (line 476) | function is_view($table_status) {
  function fk_support (line 480) | function fk_support($table_status) {
  function fields (line 484) | function fields($table) {
  function indexes (line 536) | function indexes($table, $connection2 = null) {
  function foreign_keys (line 567) | function foreign_keys($table) {
  function view (line 592) | function view($name) {
  function collations (line 596) | function collations() {
  function information_schema (line 601) | function information_schema($db) {
  function error (line 605) | function error() {
  function create_database (line 613) | function create_database($db, $collation) {
  function drop_databases (line 617) | function drop_databases($databases) {
  function rename_database (line 622) | function rename_database($name, $collation) {
  function auto_increment (line 627) | function auto_increment() {
  function alter_table (line 631) | function alter_table($table, $name, $fields, $foreign, $comment, $engine...
  function alter_indexes (line 721) | function alter_indexes($table, $alter) {
  function truncate_tables (line 757) | function truncate_tables($tables) {
  function drop_views (line 761) | function drop_views($views) {
  function drop_tables (line 765) | function drop_tables($tables) {
  function move_tables (line 775) | function move_tables($tables, $views, $target) {
  function trigger (line 785) | function trigger($name, $table) {
  function triggers (line 813) | function triggers($table) {
  function trigger_options (line 822) | function trigger_options() {
  function routine (line 830) | function routine($name, $type) {
  function routines (line 843) | function routines() {
  function routine_languages (line 850) | function routine_languages() {
  function routine_id (line 854) | function routine_id($name, $row) {
  function last_id (line 863) | function last_id($result) {
  function explain (line 868) | function explain($connection, $query) {
  function found_rows (line 872) | function found_rows($table_status, $where) {
  function types (line 878) | function types(): array {
  function type_values (line 888) | function type_values($id) {
  function schemas (line 894) | function schemas() {
  function get_schema (line 898) | function get_schema() {
  function set_schema (line 902) | function set_schema($schema, $connection2 = null) {
  function foreign_keys_sql (line 914) | function foreign_keys_sql($table) {
  function create_sql (line 929) | function create_sql($table, $auto_increment, $style) {
  function truncate_sql (line 1019) | function truncate_sql($table) {
  function trigger_sql (line 1023) | function trigger_sql($table) {
  function use_sql (line 1034) | function use_sql($database, $style = "") {
  function show_variables (line 1046) | function show_variables() {
  function process_list (line 1050) | function process_list() {
  function convert_field (line 1054) | function convert_field($field) {
  function unconvert_field (line 1057) | function unconvert_field($field, $return) {
  function support (line 1061) | function support($feature) {
  function kill_process (line 1070) | function kill_process($val) {
  function connection_id (line 1074) | function connection_id() {
  function max_connections (line 1078) | function max_connections() {

FILE: adminer/drivers/sqlite.inc.php
  class SqliteDb (line 10) | abstract class SqliteDb extends SqlDb {
    method attach (line 14) | function attach(string $filename, string $username, string $password):...
    method query (line 21) | function query(string $query, bool $unbuffered = false) {
    method quote (line 35) | function quote(string $string): string {
    method attach (line 78) | function attach(string $filename, string $username, string $password):...
  class Result (line 43) | class Result {
    method __construct (line 47) | function __construct($result) {
    method fetch_assoc (line 51) | function fetch_assoc() {
    method fetch_row (line 55) | function fetch_row() {
    method fetch_field (line 59) | function fetch_field(): \stdClass {
    method __destruct (line 69) | function __destruct() {
  class SqliteDb (line 75) | abstract class SqliteDb extends PdoDb {
    method attach (line 14) | function attach(string $filename, string $username, string $password):...
    method query (line 21) | function query(string $query, bool $unbuffered = false) {
    method quote (line 35) | function quote(string $string): string {
    method attach (line 78) | function attach(string $filename, string $username, string $password):...
  class Db (line 86) | class Db extends SqliteDb {
    method attach (line 87) | function attach(string $filename, string $username, string $password):...
    method select_db (line 94) | function select_db(string $filename): bool {
  class Driver (line 105) | class Driver extends SqlDriver {
    method connect (line 122) | static function connect(string $server, string $username, string $pass...
    method __construct (line 129) | function __construct(Db $connection) {
    method structuredTypes (line 136) | function structuredTypes(): array {
    method insertUpdate (line 140) | function insertUpdate(string $table, array $rows, array $primary) {
    method tableHelp (line 148) | function tableHelp(string $name, bool $is_view = false) {
    method checkConstraints (line 157) | function checkConstraints(string $table): array {
    method allFields (line 162) | function allFields(): array {
  function idf_escape (line 175) | function idf_escape($idf) {
  function table (line 179) | function table($idf) {
  function get_databases (line 183) | function get_databases($flush) {
  function limit (line 187) | function limit($query, $where, $limit, $offset = 0, $separator = " ") {
  function limit1 (line 191) | function limit1($table, $query, $where, $separator = "\n") {
  function db_collation (line 198) | function db_collation($db, $collations) {
  function logged_user (line 202) | function logged_user() {
  function tables_list (line 206) | function tables_list() {
  function count_tables (line 210) | function count_tables($databases) {
  function table_status (line 214) | function table_status($name = "") {
  function is_view (line 226) | function is_view($table_status) {
  function fk_support (line 230) | function fk_support($table_status) {
  function fields (line 234) | function fields($table) {
  function indexes (line 277) | function indexes($table, $connection2 = null) {
  function foreign_keys (line 321) | function foreign_keys($table) {
  function view (line 334) | function view($name) {
  function collations (line 338) | function collations() {
  function information_schema (line 342) | function information_schema($db) {
  function error (line 346) | function error() {
  function check_sqlite_name (line 350) | function check_sqlite_name($name) {
  function create_database (line 360) | function create_database($db, $collation) {
  function drop_databases (line 381) | function drop_databases($databases) {
  function rename_database (line 392) | function rename_database($name, $collation) {
  function auto_increment (line 401) | function auto_increment() {
  function alter_table (line 405) | function alter_table($table, $name, $fields, $foreign, $comment, $engine...
  function recreate_table (line 457) | function recreate_table(string $table, string $name, array $fields, arra...
  function index_sql (line 565) | function index_sql($table, $type, $name, $columns) {
  function alter_indexes (line 573) | function alter_indexes($table, $alter) {
  function truncate_tables (line 591) | function truncate_tables($tables) {
  function drop_views (line 595) | function drop_views($views) {
  function drop_tables (line 599) | function drop_tables($tables) {
  function move_tables (line 603) | function move_tables($tables, $views, $target) {
  function trigger (line 607) | function trigger($name, $table) {
  function triggers (line 628) | function triggers($table) {
  function trigger_options (line 638) | function trigger_options() {
  function begin (line 646) | function begin() {
  function last_id (line 650) | function last_id($result) {
  function explain (line 654) | function explain($connection, $query) {
  function found_rows (line 658) | function found_rows($table_status, $where) {
  function types (line 661) | function types(): array {
  function create_sql (line 665) | function create_sql($table, $auto_increment, $style) {
  function truncate_sql (line 676) | function truncate_sql($table) {
  function use_sql (line 680) | function use_sql($database, $style = "") {
  function trigger_sql (line 683) | function trigger_sql($table) {
  function show_variables (line 687) | function show_variables() {
  function show_status (line 701) | function show_status() {
  function convert_field (line 709) | function convert_field($field) {
  function unconvert_field (line 712) | function unconvert_field($field, $return) {
  function support (line 716) | function support($feature) {

FILE: adminer/elastic.php
  function adminer_object (line 4) | function adminer_object() {

FILE: adminer/include/adminer.inc.php
  class Adminer (line 7) | class Adminer {
    method name (line 14) | function name(): string {
    method credentials (line 21) | function credentials(): array {
    method connectSsl (line 28) | function connectSsl() {
    method permanentLogin (line 34) | function permanentLogin(bool $create = false): string {
    method bruteForceKey (line 39) | function bruteForceKey(): string {
    method serverName (line 46) | function serverName(?string $server): string {
    method database (line 51) | function database(): ?string {
    method databases (line 59) | function databases(bool $flush = true): array {
    method pluginsLinks (line 64) | function pluginsLinks(): void {
    method operators (line 70) | function operators(): array {
    method schemas (line 77) | function schemas(): array {
    method queryTimeout (line 84) | function queryTimeout(): float {
    method afterConnect (line 89) | function afterConnect(): void {
    method headers (line 93) | function headers(): void {
    method csp (line 100) | function csp(array $csp): array {
    method head (line 108) | function head(?bool $dark = null): bool {
    method bodyClass (line 116) | function bodyClass(): void {
    method css (line 123) | function css(): array {
    method loginForm (line 139) | function loginForm(): void {
    method loginFormField (line 157) | function loginFormField(string $name, string $heading, string $value):...
    method login (line 164) | function login(string $login, string $password) {
    method tableName (line 175) | function tableName(array $tableStatus): string {
    method fieldName (line 184) | function fieldName(array $field, int $order = 0): string {
    method selectLinks (line 194) | function selectLinks(array $tableStatus, ?string $set = ""): void {
    method foreignKeys (line 225) | function foreignKeys(string $table): array {
    method backwardKeys (line 232) | function backwardKeys(string $table, string $tableName): array {
    method backwardKeysPrint (line 240) | function backwardKeysPrint(array $backwardKeys, array $row): void {
    method selectQuery (line 247) | function selectQuery(string $query, float $start, bool $failed = false...
    method sqlCommandQuery (line 265) | function sqlCommandQuery(string $query): string {
    method sqlPrintAfter (line 270) | function sqlPrintAfter(): void {
    method rowDescription (line 276) | function rowDescription(string $table): string {
    method rowDescriptions (line 285) | function rowDescriptions(array $rows, array $foreignKeys): array {
    method selectLink (line 294) | function selectLink(?string $val, array $field) {
    method selectVal (line 303) | function selectVal(?string $val, ?string $link, array $field, ?string ...
    method editVal (line 318) | function editVal(?string $val, array $field): ?string {
    method config (line 325) | function config(): array {
    method tableStructurePrint (line 333) | function tableStructurePrint(array $fields, ?array $tableStatus = null...
    method tableIndexesPrint (line 363) | function tableIndexesPrint(array $indexes, array $tableStatus): void {
    method selectColumnsPrint (line 395) | function selectColumnsPrint(array $select, array $columns): void {
    method selectSearchPrint (line 421) | function selectSearchPrint(array $where, array $columns, array $indexe...
    method selectOrderPrint (line 456) | function selectOrderPrint(array $order, array $columns, array $indexes...
    method selectLimitPrint (line 472) | function selectLimitPrint(int $limit): void {
    method selectLengthPrint (line 482) | function selectLengthPrint(string $text_length): void {
    method selectActionPrint (line 493) | function selectActionPrint(array $indexes): void {
    method selectCommandPrint (line 519) | function selectCommandPrint(): bool {
    method selectImportPrint (line 526) | function selectImportPrint(): bool {
    method selectEmailPrint (line 534) | function selectEmailPrint(array $emailFields, array $columns): void {
    method selectColumnsProcess (line 542) | function selectColumnsProcess(array $columns, array $indexes): array {
    method selectSearchProcess (line 561) | function selectSearchProcess(array $fields, array $indexes): array {
    method selectOrderProcess (line 612) | function selectOrderProcess(array $fields, array $indexes): array {
    method selectLimitProcess (line 625) | function selectLimitProcess(): int {
    method selectLengthProcess (line 632) | function selectLengthProcess(): string {
    method selectEmailProcess (line 641) | function selectEmailProcess(array $where, array $foreignKeys): bool {
    method selectQueryBuild (line 654) | function selectQueryBuild(array $select, array $where, array $group, a...
    method messageQuery (line 662) | function messageQuery(string $query, string $time, bool $failed = fals...
    method editRowPrint (line 690) | function editRowPrint(string $table, array $fields, $row, ?bool $updat...
    method editFunctions (line 697) | function editFunctions(array $field): array {
    method editInput (line 725) | function editInput(?string $table, array $field, string $attrs, $value...
    method editHint (line 738) | function editHint(?string $table, array $field, ?string $value): string {
    method processInput (line 746) | function processInput(array $field, string $value, ?string $function =...
    method dumpOutput (line 771) | function dumpOutput(): array {
    method dumpFormat (line 782) | function dumpFormat(): array {
    method dumpDatabase (line 789) | function dumpDatabase(string $db): void {
    method dumpTable (line 796) | function dumpTable(string $table, string $style, int $is_view = 0): vo...
    method dumpData (line 828) | function dumpData(string $table, string $style, string $query): void {
    method dumpFilename (line 923) | function dumpFilename(string $identifier): string {
    method dumpHeaders (line 930) | function dumpHeaders(string $identifier, bool $multi_table = false): s...
    method dumpFooter (line 950) | function dumpFooter(): void {
    method importServerPath (line 959) | function importServerPath(): string {
    method homepage (line 966) | function homepage(): bool {
    method navigation (line 983) | function navigation(string $missing): void {
    method syntaxHighlighting (line 1042) | function syntaxHighlighting(array $tables): void {
    method databasesPrint (line 1085) | function databasesPrint(string $missing): void {
    method tablesPrint (line 1118) | function tablesPrint(array $tables): void {
    method showVariables (line 1142) | function showVariables(): array {
    method showStatus (line 1149) | function showStatus(): array {
    method processList (line 1156) | function processList(): array {
    method killProcess (line 1164) | function killProcess(string $id) {

FILE: adminer/include/auth.inc.php
  function add_invalid_login (line 12) | function add_invalid_login(): void {
  function check_invalid_login (line 45) | function check_invalid_login(array &$permanent): void {
  function unset_permanent (line 110) | function unset_permanent(array &$permanent): void {
  function auth_error (line 125) | function auth_error(string $error, array &$permanent) {

FILE: adminer/include/coverage.inc.php
  function save_coverage (line 6) | function save_coverage(): void {

FILE: adminer/include/db.inc.php
  class SqlDb (line 6) | abstract class SqlDb {
    method attach (line 21) | abstract function attach(string $server, string $username, string $pas...
    method quote (line 26) | abstract function quote(string $string): string;
    method select_db (line 31) | abstract function select_db(string $database);
    method query (line 36) | abstract function query(string $query, bool $unbuffered = false);
    method multi_query (line 41) | function multi_query(string $query) {
    method store_result (line 48) | function store_result() {
    method next_result (line 53) | function next_result(): bool {

FILE: adminer/include/design.inc.php
  function page_header (line 9) | function page_header(string $title, string $error = "", $breadcrumb = ar...
  function page_headers (line 116) | function page_headers(): void {
  function csp (line 136) | function csp(): array {
  function get_nonce (line 152) | function get_nonce(): string {
  function page_messages (line 161) | function page_messages(string $error): void {
  function page_footer (line 179) | function page_footer(string $missing = ""): void {

FILE: adminer/include/driver.inc.php
  function add_driver (line 5) | function add_driver(string $id, string $name): void {
  function get_driver (line 10) | function get_driver(string $id): ?string {
  class SqlDriver (line 14) | abstract class SqlDriver {
    method connect (line 38) | static function connect(string $server, string $username, string $pass...
    method __construct (line 44) | function __construct(Db $connection) {
    method types (line 51) | function types(): array {
    method structuredTypes (line 58) | function structuredTypes(): array {
    method enumLength (line 66) | function enumLength(array $field) {
    method unconvertFunction (line 73) | function unconvertFunction(array $field) {
    method select (line 86) | function select(string $table, array $select, array $where, array $gro...
    method delete (line 111) | function delete(string $table, string $queryWhere, int $limit = 0) {
    method update (line 122) | function update(string $table, array $set, string $queryWhere, int $li...
    method insert (line 135) | function insert(string $table, array $set) {
    method insertReturning (line 143) | function insertReturning(string $table): string {
    method insertUpdate (line 152) | function insertUpdate(string $table, array $rows, array $primary) {
    method begin (line 159) | function begin() {
    method commit (line 166) | function commit() {
    method rollback (line 173) | function rollback() {
    method slowQuery (line 181) | function slowQuery(string $query, int $timeout) {
    method convertSearch (line 189) | function convertSearch(string $idf, array $val, array $field): string {
    method value (line 196) | function value(?string $val, array $field): ?string {
    method quoteBinary (line 201) | function quoteBinary(string $s): string {
    method warnings (line 208) | function warnings() {
    method tableHelp (line 214) | function tableHelp(string $name, bool $is_view = false) {
    method inheritsFrom (line 220) | function inheritsFrom(string $table): array {
    method inheritedTables (line 227) | function inheritedTables(string $table): array {
    method partitionsInfo (line 234) | function partitionsInfo(string $table): array {
    method hasCStyleEscapes (line 239) | function hasCStyleEscapes(): bool {
    method engines (line 246) | function engines(): array {
    method supportsIndex (line 253) | function supportsIndex(array $table_status): bool {
    method indexAlgorithms (line 261) | function indexAlgorithms(array $tableStatus): array {
    method checkConstraints (line 268) | function checkConstraints(string $table): array {
    method allFields (line 281) | function allFields(): array {

FILE: adminer/include/editing.inc.php
  function print_select_result (line 12) | function print_select_result($result, ?Db $connection2 = null, array $or...
  function referencable_primary (line 98) | function referencable_primary(string $self): array {
  function textarea (line 119) | function textarea(string $name, $value, int $rows = 10, int $cols = 80):...
  function select_input (line 134) | function select_input(string $attrs, array $options, ?string $value = ""...
  function json_row (line 146) | function json_row(string $key, $val = null, bool $escape = true): void {
  function edit_type (line 166) | function edit_type(string $key, array $field, array $collations, array $...
  function process_length (line 198) | function process_length(?string $length): string {
  function process_type (line 209) | function process_type(array $field, string $collate = "COLLATE"): string {
  function process_field (line 222) | function process_field(array $field, array $type_field): array {
  function default_value (line 241) | function default_value(array $field): string {
  function type_class (line 259) | function type_class(string $type) {
  function edit_fields (line 280) | function edit_fields(array $fields, array $collations, $type = "TABLE", ...
  function process_fields (line 342) | function process_fields(array &$fields): bool {
  function normalize_enum (line 382) | function normalize_enum(array $match): string {
  function grant (line 392) | function grant(string $grant, array $privileges, ?string $columns, strin...
  function drop_create (line 414) | function drop_create(string $drop, string $create, string $drop_created,...
  function create_trigger (line 437) | function create_trigger(string $on, array $row): string {
  function create_routine (line 451) | function create_routine($routine, array $row): string {
  function remove_definer (line 471) | function remove_definer(string $query): string {
  function format_foreign_key (line 478) | function format_foreign_key(array $foreign_key): string {
  function tar_file (line 496) | function tar_file(string $filename, $tmp_file): void {
  function doc_link (line 514) | function doc_link(array $paths, string $text = "<sup>?</sup>"): string {
  function db_size (line 534) | function db_size(string $db): string {
  function set_utf8mb4 (line 546) | function set_utf8mb4(string $create): void {

FILE: adminer/include/functions.inc.php
  function connection (line 10) | function connection(?Db $connection2 = null) {
  function adminer (line 18) | function adminer() {
  function driver (line 23) | function driver(): Driver {
  function connect (line 28) | function connect(): ?Db {
  function idf_unescape (line 37) | function idf_unescape(string $idf): string {
  function q (line 46) | function q(string $string): string {
  function escape_string (line 51) | function escape_string(string $val): string {
  function idx (line 62) | function idx(?array $array, $key, $default = null) {
  function number (line 69) | function number(string $val): string {
  function number_type (line 74) | function number_type(): string {
  function remove_slashes (line 83) | function remove_slashes(array $values, bool $filter = false): array {
  function bracket_escape (line 95) | function bracket_escape(string $idf, bool $back = false): string {
  function min_version (line 105) | function min_version($version, $maria_db = "", ?Db $connection2 = null):...
  function charset (line 116) | function charset(Db $connection): string {
  function ini_bool (line 121) | function ini_bool(string $ini): bool {
  function ini_bytes (line 127) | function ini_bytes(string $ini): int {
  function sid (line 141) | function sid(): bool {
  function set_password (line 150) | function set_password(string $vendor, ?string $server, string $username,...
  function get_password (line 160) | function get_password() {
  function get_val (line 174) | function get_val(string $query, int $field = 0, ?Db $conn = null) {
  function get_vals (line 188) | function get_vals(string $query, $column = 0): array {
  function get_key_vals (line 202) | function get_key_vals(string $query, ?Db $connection2 = null, bool $set_...
  function get_rows (line 221) | function get_rows(string $query, ?Db $connection2 = null, string $error ...
  function unique_array (line 240) | function unique_array(?array $row, array $indexes) {
  function escape_key (line 256) | function escape_key(string $key): string {
  function where (line 267) | function where(array $where, array $fields = array()): string {
  function where_check (line 294) | function where_check(string $val, array $fields = array()): string {
  function where_link (line 304) | function where_link(int $i, string $column, ?string $value, string $oper...
  function convert_fields (line 313) | function convert_fields(array $columns, array $fields, array $select = a...
  function cookie (line 330) | function cookie(string $name, ?string $value, int $lifetime = 2592000): ...
  function get_settings (line 344) | function get_settings(string $cookie): array {
  function get_setting (line 353) | function get_setting(string $key, string $cookie = "adminer_settings", $...
  function save_settings (line 360) | function save_settings(array $settings, string $cookie = "adminer_settin...
  function restart_session (line 367) | function restart_session(): void {
  function stop_session (line 374) | function stop_session(bool $force = false): void {
  function get_session (line 387) | function &get_session(string $key) {
  function set_session (line 395) | function set_session(string $key, $val) {
  function auth_url (line 400) | function auth_url(string $vendor, ?string $server, string $username, ?st...
  function is_ajax (line 419) | function is_ajax(): bool {
  function redirect (line 426) | function redirect(?string $location, ?string $message = null): void {
  function query_redirect (line 443) | function query_redirect(string $query, ?string $location, string $messag...
  class Queries (line 460) | class Queries {
  function queries (line 469) | function queries(string $query) {
  function apply_queries (line 481) | function apply_queries(string $query, array $tables, $escape = 'Adminer\...
  function queries_redirect (line 493) | function queries_redirect(?string $location, string $message, $redirect)...
  function format_time (line 503) | function format_time(float $start): string {
  function relative_uri (line 508) | function relative_uri(): string {
  function remove_from_uri (line 513) | function remove_from_uri(string $param = ""): string {
  function get_file (line 520) | function get_file(string $key, bool $decompress = false, string $delimit...
  function upload_error (line 557) | function upload_error(int $error): string {
  function repeat_pattern (line 563) | function repeat_pattern(string $pattern, int $length): string {
  function is_utf8 (line 569) | function is_utf8(?string $val): bool {
  function format_number (line 577) | function format_number($val): string {
  function friendly_url (line 582) | function friendly_url(string $val): string {
  function table_status1 (line 590) | function table_status1(string $table, bool $fast = false): array {
  function column_foreign_keys (line 598) | function column_foreign_keys(string $table): array {
  function fields_from_edit (line 611) | function fields_from_edit(): array {
  function dump_headers (line 635) | function dump_headers(string $identifier, bool $multi_table = false): st...
  function dump_csv (line 653) | function dump_csv(array $row): void {
  function apply_sql_function (line 666) | function apply_sql_function(?string $function, string $column): string {
  function get_temp_dir (line 671) | function get_temp_dir(): string {
  function file_open_lock (line 691) | function file_open_lock(string $filename) {
  function file_write_unlock (line 710) | function file_write_unlock($fp, string $data): void {
  function file_unlock (line 720) | function file_unlock($fp): void {
  function first (line 729) | function first(array $array) {
  function password_file (line 737) | function password_file(bool $create): string {
  function rand_string (line 759) | function rand_string(): string {
  function select_value (line 769) | function select_value($val, string $link, array $field, ?string $text_le...
  function is_blob (line 823) | function is_blob(array $field): bool {
  function is_mail (line 828) | function is_mail(?string $email): bool {
  function is_url (line 836) | function is_url(?string $string): bool {
  function is_shortable (line 844) | function is_shortable(array $field): bool {
  function host_port (line 851) | function host_port(string $server) {
  function count_rows (line 862) | function count_rows(string $table, array $where, bool $is_group, array $...
  function slow_query (line 873) | function slow_query(string $query): array {
  function get_token (line 897) | function get_token(): string {
  function verify_token (line 903) | function verify_token(): bool {
  function lzw_decompress (line 909) | function lzw_decompress(string $binary): string {

FILE: adminer/include/html.inc.php
  function script (line 5) | function script(string $source, string $trailing = "\n"): string {
  function script_src (line 10) | function script_src(string $url, bool $defer = false): string {
  function nonce (line 15) | function nonce(): string {
  function input_hidden (line 23) | function input_hidden(string $name, $value = ""): string {
  function input_token (line 30) | function input_token(): string {
  function target_blank (line 35) | function target_blank(): string {
  function h (line 40) | function h(?string $string): string {
  function nl_br (line 45) | function nl_br(string $string): string {
  function checkbox (line 52) | function checkbox(string $name, $value, ?bool $checked, string $label = ...
  function optionlist (line 67) | function optionlist($options, $selected = null, bool $use_keys = false):...
  function html_select (line 92) | function html_select(string $name, array $options, ?string $value = "", ...
  function html_radios (line 111) | function html_radios(string $name, array $options, ?string $value = "", ...
  function confirm (line 120) | function confirm(string $message = "", string $selector = "qsl('input')"...
  function print_fieldset (line 127) | function print_fieldset(string $id, string $legend, $visible = false): v...
  function bold (line 136) | function bold(bool $bold, string $class = ""): string {
  function js_escape (line 141) | function js_escape(string $string): string {
  function pagination (line 146) | function pagination(int $page, ?int $current): string {
  function hidden_fields (line 157) | function hidden_fields(array $process, array $ignore = array(), string $...
  function hidden_fields_get (line 173) | function hidden_fields_get(): void {
  function file_input (line 180) | function file_input(string $input): string {
  function enum_input (line 198) | function enum_input(string $type, string $attrs, array $field, $value, s...
  function input (line 215) | function input(array $field, $value, ?string $function, ?bool $autofocus...
  function process_input (line 305) | function process_input(array $field) {
  function search_tables (line 356) | function search_tables(): void {
  function on_help (line 377) | function on_help(string $command, int $side = 0): string {
  function edit_form (line 385) | function edit_form(string $table, array $fields, $row, ?bool $update, st...
  function shorten_utf8 (line 497) | function shorten_utf8(string $string, int $length = 80, string $suffix =...
  function icon (line 505) | function icon(string $icon, string $name, string $html, string $title): ...

FILE: adminer/include/lang.inc.php
  function lang (line 8) | function lang(string $idf, $number = null): string {
  function lang_format (line 19) | function lang_format($translation, $number = null): string {
  function langs (line 50) | function langs(): array {
  function switch_lang (line 102) | function switch_lang(): void {
  class Lang (line 144) | class Lang {

FILE: adminer/include/pdo.inc.php
  class PdoDb (line 6) | abstract class PdoDb extends SqlDb {
    method dsn (line 13) | function dsn(string $dsn, string $username, string $password, array $o...
    method quote (line 25) | function quote(string $string): string {
    method query (line 29) | function query(string $query, bool $unbuffered = false) {
    method store_result (line 44) | function store_result($result = null) {
    method next_result (line 59) | function next_result(): bool {
  class PdoResult (line 70) | class PdoResult extends \PDOStatement {
    method fetch_assoc (line 73) | function fetch_assoc() {
    method fetch_row (line 77) | function fetch_row() {
    method fetch_array (line 81) | private function fetch_array(int $mode) {
    method unresource (line 86) | private function unresource($val) {
    method fetch_field (line 90) | function fetch_field(): \stdClass {
    method seek (line 98) | function seek($offset) {

FILE: adminer/include/plugin.inc.php
  class Plugin (line 5) | abstract class Plugin {
    method description (line 11) | function description() {
    method screenshot (line 18) | function screenshot() {
    method lang (line 26) | protected function lang(string $idf, $number = null): string {

FILE: adminer/include/plugins.inc.php
  class Plugins (line 4) | class Plugins {
    method __construct (line 14) | function __construct(?array $plugins) {
    method includeOnce (line 65) | function includeOnce(string $filename) {
    method __call (line 74) | function __call(string $name, array $params) {

FILE: adminer/include/tmpfile.inc.php
  class TmpFile (line 4) | class TmpFile {
    method __construct (line 8) | function __construct() {
    method write (line 12) | function write(string $contents): void {
    method send (line 17) | function send(): void {

FILE: adminer/include/xxtea.inc.php
  function int32 (line 9) | function int32(int $n): int {
  function long2str (line 22) | function long2str(array $v, bool $w): string {
  function str2long (line 36) | function str2long(string $s, bool $w): array {
  function xxtea_mx (line 44) | function xxtea_mx(int $z, int $y, int $sum, int $k): int {
  function encrypt_string (line 52) | function encrypt_string(string $str, string $key): string {
  function decrypt_string (line 84) | function decrypt_string(string $str, string $key) {

FILE: adminer/sqlite.php
  function adminer_object (line 2) | function adminer_object() {

FILE: adminer/static/editing.js
  function syntaxHighlighting (line 9) | function syntaxHighlighting(version, vendor) {
  function formField (line 69) | function formField(form, name) {
  function typePassword (line 82) | function typePassword(el, disable) {
  function messagesPrint (line 92) | function messagesPrint(parent) {
  function loginDriver (line 110) | function loginDriver(driver) {
  function dbMouseDown (line 126) | function dbMouseDown(event) {
  function dbChange (line 143) | function dbChange() {
  function selectFieldChange (line 160) | function selectFieldChange() {
  function delimiterEqual (line 221) | function delimiterEqual(val, a, b) {
  function idfEscape (line 229) | function idfEscape(s) {
  function editFields (line 237) | function editFields() {
  function editingClick (line 267) | function editingClick(event) {
  function editingInput (line 302) | function editingInput(event) {
  function editingNameChange (line 313) | function editingNameChange() {
  function editingAddRow (line 350) | function editingAddRow(focus) {
  function editingRemoveRow (line 392) | function editingRemoveRow(name) {
  function editingMoveRow (line 404) | function editingMoveRow(up){
  function editingTypeChange (line 420) | function editingTypeChange() {
  function editingLengthChange (line 457) | function editingLengthChange() {
  function editingLengthFocus (line 464) | function editingLengthFocus() {
  function enumValues (line 480) | function enumValues(s) {
  function editingLengthBlur (line 498) | function editingLengthBlur() {
  function columnShow (line 510) | function columnShow(checked, column) {
  function indexOptionsShow (line 519) | function indexOptionsShow(checked) {
  function partitionByChange (line 528) | function partitionByChange() {
  function partitionNameChange (line 538) | function partitionNameChange() {
  function editingCommentsClick (line 549) | function editingCommentsClick(el, focus) {
  function dumpClick (line 564) | function dumpClick(event) {
  function foreignAddRow (line 581) | function foreignAddRow() {
  function indexesAddRow (line 596) | function indexesAddRow() {
  function indexesChangeColumn (line 614) | function indexesChangeColumn(prefix) {
  function indexesAddColumn (line 633) | function indexesAddColumn(prefix) {
  function sqlSubmit (line 664) | function sqlSubmit(form, root) {
  function fileChange (line 683) | function fileChange(event, count, countMessage, size, sizeMessage) {
  function triggerChange (line 698) | function triggerChange(tableRe, table, form) {
  function schemaMousedown (line 714) | function schemaMousedown(event) {
  function schemaMousemove (line 725) | function schemaMousemove(event) {
  function schemaMouseup (line 767) | function schemaMouseup(event, db) {
  function helpMouseover (line 792) | function helpMouseover(event, text, side) {
  function helpMouseout (line 813) | function helpMouseout(event) {
  function helpClose (line 825) | function helpClose() {

FILE: adminer/static/functions.js
  function qs (line 8) | function qs(selector, context) {
  function qsl (line 17) | function qsl(selector, context) {
  function qsa (line 27) | function qsa(selector, context) {
  function partial (line 36) | function partial(fn) {
  function partialArg (line 48) | function partialArg(fn) {
  function mixin (line 60) | function mixin(target, source) {
  function alterClass (line 71) | function alterClass(el, className, enable) {
  function toggle (line 81) | function toggle(id) {
  function cookie (line 91) | function cookie(assign, days) {
  function verifyVersion (line 100) | function verifyVersion(current) {
  function selectValue (line 114) | function selectValue(select) {
  function isTag (line 127) | function isTag(el, tag) {
  function parentTag (line 137) | function parentTag(el, tag) {
  function trCheck (line 147) | function trCheck(el) {
  function selectCount (line 160) | function selectCount(id, count) {
  function formCheck (line 176) | function formCheck(name) {
  function tableCheck (line 187) | function tableCheck() {
  function formUncheck (line 196) | function formUncheck(id) {
  function formChecked (line 207) | function formChecked(input, name) {
  function tableClick (line 221) | function tableClick(event, click) {
  function checkboxClick (line 265) | function checkboxClick(event) {
  function setHtml (line 295) | function setHtml(id, html) {
  function nodePosition (line 310) | function nodePosition(el) {
  function pageClick (line 322) | function pageClick(href, page) {
  function menuOver (line 334) | function menuOver(event) {
  function menuOut (line 344) | function menuOut() {
  function selectAddRow (line 353) | function selectAddRow() {
  function selectSearchKeydown (line 378) | function selectSearchKeydown(event) {
  function selectSearchSearch (line 387) | function selectSearchSearch() {
  function columnMouse (line 399) | function columnMouse(className) {
  function selectSearch (line 413) | function selectSearch(name) {
  function isCtrl (line 438) | function isCtrl(event) {
  function bodyKeydown (line 449) | function bodyKeydown(event, button) {
  function bodyClick (line 472) | function bodyClick(event) {
  function editingKeydown (line 489) | function editingKeydown(event) {
  function functionChange (line 508) | function functionChange() {
  function skipOriginal (line 533) | function skipOriginal(first) {
  function fieldChange (line 543) | function fieldChange() {
  function ajax (line 563) | function ajax(url, callback, data, message) {
  function ajaxSetHtml (line 595) | function ajaxSetHtml(url) {
  function ajaxForm (line 613) | function ajaxForm(form, message, button) {
  function selectClick (line 652) | function selectClick(event, text, warning) {
  function selectLoadMore (line 715) | function selectLoadMore(limit, loading) {
  function eventStop (line 742) | function eventStop(event) {
  function setupSubmitHighlight (line 751) | function setupSubmitHighlight(parent) {
  function setupSubmitHighlightInput (line 760) | function setupSubmitHighlightInput(input) {
  function inputFocus (line 770) | function inputFocus() {
  function inputBlur (line 777) | function inputBlur() {
  function findDefaultSubmit (line 785) | function findDefaultSubmit(el) {
  function addEvent (line 806) | function addEvent(el, action, handler) {
  function cloneNode (line 814) | function cloneNode(el) {

FILE: adminer/table.inc.php
  function tables_links (line 32) | function tables_links(array $tables): void {

FILE: compile.php
  function add_apo_slashes (line 8) | function add_apo_slashes($s) {
  function add_quo_slashes (line 12) | function add_quo_slashes($s) {
  function remove_lang (line 20) | function remove_lang($match) {
  function lang_ids (line 29) | function lang_ids($match) {
  function put_file (line 38) | function put_file($match) {
  function lzw_compress (line 113) | function lzw_compress($string) {
  function put_file_lang (line 150) | function put_file_lang($match) {
  function minify_css (line 190) | function minify_css($file) {
  function minify_js (line 201) | function minify_js($file) {
  function compile_file (line 214) | function compile_file($match, $callback = '') {
  function number_type (line 229) | function number_type() {
  function ini_bool (line 233) | function ini_bool() {

FILE: coverage.php
  function xhtml_open_tags (line 12) | function xhtml_open_tags($s) {

FILE: editor/example.php
  function adminer_object (line 2) | function adminer_object() {

FILE: editor/include/adminer.inc.php
  class Adminer (line 4) | class Adminer {
    method name (line 9) | function name() {
    method credentials (line 15) | function credentials() {
    method connectSsl (line 19) | function connectSsl() {
    method permanentLogin (line 22) | function permanentLogin($create = false) {
    method bruteForceKey (line 26) | function bruteForceKey() {
    method serverName (line 30) | function serverName($server) {
    method database (line 33) | function database() {
    method operators (line 43) | function operators() {
    method schemas (line 47) | function schemas() {
    method databases (line 51) | function databases($flush = true) {
    method pluginsLinks (line 55) | function pluginsLinks(): void {
    method queryTimeout (line 58) | function queryTimeout() {
    method afterConnect (line 62) | function afterConnect() {
    method headers (line 65) | function headers() {
    method csp (line 68) | function csp($csp) {
    method head (line 72) | function head($dark = null) {
    method bodyClass (line 76) | function bodyClass(): void {
    method css (line 80) | function css() {
    method loginForm (line 95) | function loginForm() {
    method loginFormField (line 104) | function loginFormField($name, $heading, $value) {
    method login (line 108) | function login($login, $password) {
    method tableName (line 112) | function tableName($tableStatus) {
    method fieldName (line 119) | function fieldName($field, $order = 0) {
    method selectLinks (line 123) | function selectLinks($tableStatus, $set = "") {
    method foreignKeys (line 130) | function foreignKeys($table) {
    method backwardKeys (line 134) | function backwardKeys($table, $tableName) {
    method backwardKeysPrint (line 159) | function backwardKeysPrint($backwardKeys, $row) {
    method selectQuery (line 177) | function selectQuery($query, $start, $failed = false) {
    method rowDescription (line 181) | function rowDescription($table) {
    method rowDescriptions (line 191) | function rowDescriptions($rows, $foreignKeys) {
    method selectLink (line 216) | function selectLink($val, $field) {
    method selectVal (line 219) | function selectVal($val, $link, $field, $original) {
    method editVal (line 241) | function editVal($val, $field) {
    method config (line 248) | function config() {
    method selectColumnsPrint (line 252) | function selectColumnsPrint($select, $columns) {
    method selectSearchPrint (line 256) | function selectSearchPrint($where, $columns, $indexes) {
    method selectOrderPrint (line 305) | function selectOrderPrint($order, $columns, $indexes) {
    method selectLimitPrint (line 330) | function selectLimitPrint($limit) {
    method selectLengthPrint (line 336) | function selectLengthPrint($text_length) {
    method selectActionPrint (line 339) | function selectActionPrint($indexes) {
    method selectCommandPrint (line 345) | function selectCommandPrint() {
    method selectImportPrint (line 349) | function selectImportPrint() {
    method selectEmailPrint (line 353) | function selectEmailPrint($emailFields, $columns) {
    method selectColumnsProcess (line 356) | function selectColumnsProcess($columns, $indexes) {
    method selectSearchProcess (line 360) | function selectSearchProcess($fields, $indexes) {
    method selectOrderProcess (line 399) | function selectOrderProcess($fields, $indexes) {
    method selectLimitProcess (line 427) | function selectLimitProcess() {
    method selectLengthProcess (line 431) | function selectLengthProcess() {
    method selectEmailProcess (line 435) | function selectEmailProcess($where, $foreignKeys) {
    method selectQueryBuild (line 439) | function selectQueryBuild($select, $where, $group, $order, $limit, $pa...
    method messageQuery (line 443) | function messageQuery($query, $time, $failed = false) {
    method editRowPrint (line 447) | function editRowPrint($table, $fields, $row, $update) {
    method editFunctions (line 450) | function editFunctions($field) {
    method editInput (line 466) | function editInput($table, $field, $attrs, $value) {
    method editHint (line 501) | function editHint($table, $field, $value) {
    method processInput (line 505) | function processInput($field, $value, $function = "") {
    method dumpOutput (line 524) | function dumpOutput() {
    method dumpFormat (line 528) | function dumpFormat() {
    method dumpDatabase (line 532) | function dumpDatabase($db) {
    method dumpTable (line 535) | function dumpTable($table, $style, $is_view = 0) {
    method dumpData (line 539) | function dumpData($table, $style, $query) {
    method dumpFilename (line 552) | function dumpFilename($identifier) {
    method dumpHeaders (line 556) | function dumpHeaders($identifier, $multi_table = false) {
    method dumpFooter (line 562) | function dumpFooter() {
    method importServerPath (line 565) | function importServerPath() {
    method homepage (line 568) | function homepage() {
    method navigation (line 572) | function navigation($missing) {
    method syntaxHighlighting (line 605) | function syntaxHighlighting($tables) {
    method databasesPrint (line 608) | function databasesPrint($missing) {
    method tablesPrint (line 611) | function tablesPrint($tables) {
    method _foreignColumn (line 627) | function _foreignColumn($foreignKeys, $column) {
    method foreignKeyOptions (line 639) | private function foreignKeyOptions($table, $column, $value = null) {

FILE: editor/include/editing.inc.php
  function doc_link (line 4) | function doc_link(array $paths, string $text = ""): string {
  function email_header (line 9) | function email_header(string $header): string {
  function send_mail (line 17) | function send_mail(string $email, string $subject, string $message, stri...
  function like_bool (line 48) | function like_bool(array $field): bool {

FILE: editor/sqlite.php
  function adminer_object (line 4) | function adminer_object() {

FILE: editor/static/editing.js
  function messagesPrint (line 3) | function messagesPrint() {
  function selectFieldChange (line 6) | function selectFieldChange() {
  function helpMouseover (line 11) | function helpMouseover() {
  function helpMouseout (line 14) | function helpMouseout() {
  function helpClose (line 17) | function helpClose() {
  function whisper (line 24) | function whisper(url) {
  function whisperClick (line 46) | function whisperClick(event) {

FILE: lang.php
  function update_translations (line 39) | function update_translations($lang, $messages, $filename, $pattern, $tab...

FILE: plugins/adminer.js.php
  class AdminerDotJs (line 11) | class AdminerDotJs extends Adminer\Plugin {
    method head (line 14) | function head($dark = null) {

FILE: plugins/backward-keys.php
  class AdminerBackwardKeys (line 9) | class AdminerBackwardKeys extends Adminer\Plugin {
    method backwardKeys (line 12) | function backwardKeys($table, $tableName) {
    method backwardKeysPrint (line 48) | function backwardKeysPrint($backwardKeys, $row) {
    method screenshot (line 69) | function screenshot() {

FILE: plugins/before-unload.php
  class AdminerBeforeUnload (line 9) | class AdminerBeforeUnload extends Adminer\Plugin {
    method head (line 11) | function head($dark = null) {

FILE: plugins/config.php
  class AdminerConfig (line 9) | class AdminerConfig extends Adminer\Plugin {
    method headers (line 11) | function headers() {
    method config (line 40) | function config() {
    method css (line 48) | function css() {
    method pluginsLinks (line 54) | function pluginsLinks() {
    method screenshot (line 59) | function screenshot() {

FILE: plugins/dark-switcher.php
  class AdminerDarkSwitcher (line 9) | class AdminerDarkSwitcher extends Adminer\Plugin {
    method head (line 11) | function head($dark = null) {
    method navigation (line 38) | function navigation($missing) {
    method screenshot (line 44) | function screenshot() {

FILE: plugins/database-hide.php
  class AdminerDatabaseHide (line 9) | class AdminerDatabaseHide extends Adminer\Plugin {
    method __construct (line 15) | function __construct(array $disabled) {
    method databases (line 19) | function databases($flush = true) {

FILE: plugins/designs.php
  class AdminerDesigns (line 9) | class AdminerDesigns extends Adminer\Plugin {
    method __construct (line 15) | function __construct(array $designs) {
    method afterConnect (line 19) | function afterConnect() {
    method css (line 27) | function css() {
    method navigation (line 35) | function navigation($missing) {
    method screenshot (line 42) | function screenshot() {

FILE: plugins/drivers/clickhouse.php
  class Db (line 10) | class Db extends SqlDb {
    method rootQuery (line 15) | function rootQuery($db, $query) {
    method isQuerySelectLike (line 61) | function isQuerySelectLike($query) {
    method query (line 65) | function query($query, $unbuffered = false) {
    method attach (line 69) | function attach($server, $username, $password): string {
    method select_db (line 76) | function select_db($database) {
    method quote (line 81) | function quote($string): string {
  class Result (line 86) | class Result {
    method __construct (line 90) | function __construct($result) {
    method fetch_assoc (line 104) | function fetch_assoc() {
    method fetch_row (line 110) | function fetch_row() {
    method fetch_field (line 116) | function fetch_field(): \stdClass {
  class Driver (line 129) | class Driver extends SqlDriver {
    method connect (line 136) | static function connect($server, $username, $password) {
    method __construct (line 143) | function __construct(Db $connection) {
    method delete (line 158) | function delete($table, $queryWhere, $limit = 0) {
    method update (line 165) | function update($table, array $set, $queryWhere, $limit = 0, $separato...
  function idf_escape (line 175) | function idf_escape($idf) {
  function table (line 179) | function table($idf) {
  function explain (line 183) | function explain($connection, $query) {
  function found_rows (line 187) | function found_rows($table_status, $where) {
  function alter_table (line 192) | function alter_table($table, $name, $fields, $foreign, $comment, $engine...
  function truncate_tables (line 232) | function truncate_tables($tables) {
  function drop_views (line 236) | function drop_views($views) {
  function drop_tables (line 240) | function drop_tables($tables) {
  function get_databases (line 244) | function get_databases($flush) {
  function limit (line 255) | function limit($query, $where, $limit, $offset = 0, $separator = " ") {
  function limit1 (line 259) | function limit1($table, $query, $where, $separator = "\n") {
  function db_collation (line 263) | function db_collation($db, $collations) {
  function logged_user (line 266) | function logged_user() {
  function tables_list (line 271) | function tables_list() {
  function count_tables (line 281) | function count_tables($databases) {
  function table_status (line 285) | function table_status($name = "", $fast = false) {
  function is_view (line 297) | function is_view($table_status) {
  function fk_support (line 301) | function fk_support($table_status) {
  function convert_field (line 305) | function convert_field($field) {
  function unconvert_field (line 308) | function unconvert_field($field, $return) {
  function fields (line 315) | function fields($table) {
  function indexes (line 335) | function indexes($table, $connection2 = null) {
  function foreign_keys (line 339) | function foreign_keys($table) {
  function collations (line 343) | function collations() {
  function information_schema (line 347) | function information_schema($db) {
  function error (line 351) | function error() {
  function types (line 355) | function types(): array {
  function auto_increment (line 359) | function auto_increment() {
  function last_id (line 363) | function last_id($result) {
  function support (line 367) | function support($feature) {

FILE: plugins/drivers/elastic.php
  class Db (line 11) | class Db extends SqlDb {
    method rootQuery (line 18) | function rootQuery($path, $content = null, $method = 'GET') {
    method query (line 56) | function query($query, $unbuffered = false) {
    method attach (line 64) | function attach($server, $username, $password): string {
    method select_db (line 74) | function select_db($database) {
    method quote (line 78) | function quote($string): string {
  class Result (line 83) | class Result {
    method __construct (line 87) | function __construct($rows) {
    method fetch_assoc (line 93) | function fetch_assoc() {
    method fetch_row (line 99) | function fetch_row() {
  class Driver (line 106) | class Driver extends SqlDriver {
    method connect (line 113) | static function connect($server, $username, $password) {
    method __construct (line 123) | function __construct(Db $connection) {
    method select (line 133) | function select($table, array $select, array $where, array $group, arr...
    method update (line 230) | function update($table, array $set, $queryWhere, $limit = 0, $separato...
    method insert (line 243) | function insert($type, array $record) {
    method delete (line 263) | function delete($table, $queryWhere, $limit = 0) {
  function support (line 292) | function support($feature) {
  function logged_user (line 296) | function logged_user() {
  function get_databases (line 302) | function get_databases($flush) {
  function limit (line 306) | function limit($query, $where, $limit, $offset = 0, $separator = " ") {
  function collations (line 310) | function collations() {
  function db_collation (line 314) | function db_collation($db, $collations) {
  function count_tables (line 318) | function count_tables($databases) {
  function tables_list (line 323) | function tables_list() {
  function table_status (line 342) | function table_status($name = "", $fast = false) {
  function format_index_status (line 386) | function format_index_status($name, $index) {
  function format_alias_status (line 399) | function format_alias_status($name, $index) {
  function is_view (line 407) | function is_view($table_status) {
  function view (line 411) | function view(string $name): array {
  function error (line 416) | function error() {
  function information_schema (line 420) | function information_schema($db) {
  function indexes (line 424) | function indexes($table, $connection2 = null) {
  function fields (line 430) | function fields($table) {
  function foreign_keys (line 480) | function foreign_keys($table) {
  function table (line 484) | function table($idf) {
  function idf_escape (line 488) | function idf_escape($idf) {
  function convert_field (line 492) | function convert_field($field) {
  function unconvert_field (line 496) | function unconvert_field($field, $return) {
  function fk_support (line 500) | function fk_support($table_status) {
  function found_rows (line 504) | function found_rows($table_status, $where) {
  function auto_increment (line 507) | function auto_increment(): string {
  function alter_table (line 514) | function alter_table($table, $name, $fields, $foreign, $comment, $engine...
  function drop_views (line 537) | function drop_views(array $tables): bool {
  function drop_tables (line 544) | function drop_tables(array $tables): bool {
  function last_id (line 552) | function last_id($result) {

FILE: plugins/drivers/firebird.php
  class Db (line 14) | class Db extends SqlDb {
    method attach (line 17) | function attach($server, $username, $password): string {
    method quote (line 28) | function quote($string): string {
    method select_db (line 32) | function select_db($database) {
    method query (line 36) | function query($query, $unbuffered = false) {
  class Result (line 52) | class Result {
    method __construct (line 56) | function __construct($result) {
    method fetch_assoc (line 61) | function fetch_assoc() {
    method fetch_row (line 65) | function fetch_row() {
    method fetch_field (line 69) | function fetch_field(): \stdClass {
    method __destruct (line 78) | function __destruct() {
  class Driver (line 87) | class Driver extends SqlDriver {
  function idf_escape (line 96) | function idf_escape($idf) {
  function table (line 100) | function table($idf) {
  function get_databases (line 104) | function get_databases($flush) {
  function limit (line 108) | function limit($query, $where, $limit, $offset = 0, $separator = " ") {
  function limit1 (line 115) | function limit1($table, $query, $where, $separator = "\n") {
  function db_collation (line 119) | function db_collation($db, $collations) {
  function logged_user (line 122) | function logged_user() {
  function tables_list (line 127) | function tables_list() {
  function count_tables (line 138) | function count_tables($databases) {
  function table_status (line 142) | function table_status($name = "", $fast = false) {
  function is_view (line 155) | function is_view($table_status) {
  function fk_support (line 159) | function fk_support($table_status) {
  function fields (line 163) | function fields($table) {
  function indexes (line 215) | function indexes($table, $connection2 = null) {
  function foreign_keys (line 232) | function foreign_keys($table) {
  function collations (line 236) | function collations() {
  function information_schema (line 240) | function information_schema($db) {
  function error (line 244) | function error() {
  function types (line 248) | function types(): array {
  function support (line 252) | function support($feature) {

FILE: plugins/drivers/igdb.php
  class Db (line 16) | class Db extends SqlDb {
    method attach (line 22) | function attach($server, $username, $password): string {
    method select_db (line 28) | function select_db($database) {
    method request (line 32) | function request($endpoint, $query, $method = 'POST') {
    method query (line 60) | function query($query, $unbuffered = false) {
    method store_result (line 84) | function store_result() {
    method next_result (line 92) | function next_result(): bool {
    method quote (line 96) | function quote($string): string {
  class Result (line 101) | class Result {
    method __construct (line 108) | function __construct($result) {
    method fetch_assoc (line 126) | function fetch_assoc() {
    method fetch_row (line 132) | function fetch_row() {
    method fetch_field (line 137) | function fetch_field(): \stdClass {
  class Driver (line 144) | class Driver extends SqlDriver {
    method connect (line 158) | static function connect(string $server, string $username, string $pass...
    method __construct (line 165) | function __construct($connection) {
    method select (line 270) | function select($table, $select, $where, $group, $order = array(), $li...
    method insert (line 315) | function insert($table, $set) {
    method delete (line 325) | function delete($table, $queryWhere, $limit = 0) {
    method value (line 343) | function value($val, $field): ?string {
    method tableHelp (line 347) | function tableHelp($name, $is_view = false) {
  function logged_user (line 352) | function logged_user() {
  function get_databases (line 356) | function get_databases($flush) {
  function collations (line 360) | function collations() {
  function db_collation (line 364) | function db_collation($db, $collations) {
  function information_schema (line 367) | function information_schema($db) {
  function indexes (line 370) | function indexes($table, $connection2 = null) {
  function fields (line 378) | function fields($table) {
  function convert_field (line 391) | function convert_field($field) {
  function unconvert_field (line 394) | function unconvert_field($field, $return) {
  function limit (line 398) | function limit($query, $where, $limit, $offset = 0, $separator = " ") {
  function idf_escape (line 402) | function idf_escape($idf) {
  function table (line 406) | function table($idf) {
  function foreign_keys (line 410) | function foreign_keys($table) {
  function tables_list (line 422) | function tables_list() {
  function table_status (line 426) | function table_status($name = "", $fast = false) {
  function count_tables (line 431) | function count_tables($databases) {
  function error (line 435) | function error() {
  function is_view (line 439) | function is_view($table_status) {
  function found_rows (line 443) | function found_rows($table_status, $where) {
  function fk_support (line 447) | function fk_support($table_status) {
  function last_id (line 451) | function last_id($result): string {
  function support (line 456) | function support($feature) {

FILE: plugins/drivers/imap.php
  class Db (line 21) | class Db extends SqlDb {
    method attach (line 27) | function attach($server, $username, $password): string {
    method select_db (line 34) | function select_db($database) {
    method query (line 38) | function query($query, $unbuffered = false) {
    method quote (line 71) | function quote($string): string {
    method tables_list (line 75) | function tables_list() {
    method table_status (line 86) | function table_status($name, $fast) {
    method create (line 100) | function create($name) {
    method drop (line 104) | function drop($name) {
    method expunge (line 108) | function expunge() {
  class Result (line 113) | class Result {
    method __construct (line 118) | function __construct($result) {
    method fetch_assoc (line 124) | function fetch_assoc() {
    method fetch_row (line 130) | function fetch_row() {
    method fetch_field (line 135) | function fetch_field(): \stdClass {
  class Driver (line 143) | class Driver extends SqlDriver {
  function logged_user (line 149) | function logged_user() {
  function get_databases (line 153) | function get_databases($flush) {
  function collations (line 157) | function collations() {
  function db_collation (line 161) | function db_collation($db, $collations) {
  function information_schema (line 164) | function information_schema($db) {
  function indexes (line 167) | function indexes($table, $connection2 = null) {
  function fields (line 171) | function fields($table) {
  function convert_field (line 204) | function convert_field($field) {
  function unconvert_field (line 207) | function unconvert_field($field, $return) {
  function limit (line 211) | function limit($query, $where, $limit, $offset = 0, $separator = " ") {
  function idf_escape (line 215) | function idf_escape($idf) {
  function table (line 219) | function table($idf) {
  function foreign_keys (line 223) | function foreign_keys($table) {
  function tables_list (line 227) | function tables_list() {
  function table_status (line 231) | function table_status($name = "", $fast = false) {
  function count_tables (line 239) | function count_tables($databases) {
  function error (line 243) | function error() {
  function is_view (line 247) | function is_view($table_status) {
  function found_rows (line 251) | function found_rows($table_status, $where) {
  function fk_support (line 255) | function fk_support($table_status) {
  function alter_table (line 258) | function alter_table($table, $name, $fields, $foreign, $comment, $engine...
  function drop_tables (line 262) | function drop_tables($tables) {
  function truncate_tables (line 270) | function truncate_tables($tables) {
  function support (line 274) | function support($feature) {

FILE: plugins/drivers/mongo.php
  class Db (line 10) | class Db extends SqlDb {
    method attach (line 15) | function attach($server, $username, $password): string {
    method executeCommand (line 33) | function executeCommand($command) {
    method executeDbCommand (line 37) | function executeDbCommand($db, $command) {
    method executeBulkWrite (line 46) | function executeBulkWrite($namespace, $bulk, $counter) {
    method query (line 57) | function query($query, $unbuffered = false) {
    method select_db (line 61) | function select_db($database) {
    method quote (line 66) | function quote($string): string {
  class Result (line 71) | class Result {
    method __construct (line 75) | function __construct($result) {
    method fetch_assoc (line 101) | function fetch_assoc() {
    method fetch_row (line 114) | function fetch_row() {
    method fetch_field (line 122) | function fetch_field(): \stdClass {
  function get_databases (line 135) | function get_databases($flush) {
  function count_tables (line 145) | function count_tables($databases) {
  function tables_list (line 150) | function tables_list() {
  function drop_databases (line 158) | function drop_databases($databases) {
  function indexes (line 162) | function indexes($table, $connection2 = null) {
  function fields (line 181) | function fields($table) {
  function found_rows (line 210) | function found_rows($table_status, $where) {
  function sql_query_where_parser (line 216) | function sql_query_where_parser($queryWhere) {
  function where_to_query (line 236) | function where_to_query($whereAnd = array(), $whereOr = array()) {
  class Driver (line 296) | class Driver extends SqlDriver {
    method connect (line 326) | static function connect($server, $username, $password) {
    method select (line 333) | function select($table, array $select, array $where, array $group, arr...
    method update (line 357) | function update($table, array $set, $queryWhere, $limit = 0, $separato...
    method delete (line 379) | function delete($table, $queryWhere, $limit = 0) {
    method insert (line 387) | function insert($table, array $set) {
  function table (line 400) | function table($idf) {
  function idf_escape (line 404) | function idf_escape($idf) {
  function table_status (line 408) | function table_status($name = "", $fast = false) {
  function create_database (line 416) | function create_database($db, $collation) {
  function last_id (line 420) | function last_id($result) {
  function error (line 424) | function error() {
  function collations (line 428) | function collations() {
  function logged_user (line 432) | function logged_user() {
  function alter_indexes (line 437) | function alter_indexes($table, $alter) {
  function support (line 462) | function support($feature) {
  function db_collation (line 466) | function db_collation($db, $collations) {
  function information_schema (line 469) | function information_schema($db) {
  function is_view (line 472) | function is_view($table_status) {
  function convert_field (line 475) | function convert_field($field) {
  function unconvert_field (line 478) | function unconvert_field($field, $return) {
  function foreign_keys (line 482) | function foreign_keys($table) {
  function fk_support (line 486) | function fk_support($table_status) {
  function alter_table (line 489) | function alter_table($table, $name, $fields, $foreign, $comment, $engine...
  function drop_tables (line 496) | function drop_tables($tables) {
  function truncate_tables (line 506) | function truncate_tables($tables) {

FILE: plugins/drivers/simpledb.php
  class Db (line 10) | class Db extends SqlDb {
    method attach (line 13) | function attach($server, $username, $password): string {
    method select_db (line 17) | function select_db($database) {
    method query (line 21) | function query($query, $unbuffered = false) {
    method quote (line 44) | function quote($string): string {
  class Result (line 49) | class Result {
    method __construct (line 53) | function __construct($result) {
    method processValue (line 79) | private function processValue($element) {
    method fetch_assoc (line 83) | function fetch_assoc() {
    method fetch_row (line 96) | function fetch_row() {
    method fetch_field (line 104) | function fetch_field(): \stdClass {
  class Driver (line 113) | class Driver extends SqlDriver {
    method connect (line 122) | static function connect($server, $username, $password) {
    method chunkRequest (line 132) | private function chunkRequest($ids, $action, $params, $expand = array(...
    method extractIds (line 149) | private function extractIds($table, $queryWhere, $limit) {
    method select (line 161) | function select($table, array $select, array $where, array $group, arr...
    method delete (line 168) | function delete($table, $queryWhere, $limit = 0) {
    method update (line 176) | function update($table, array $set, $queryWhere, $limit = 0, $separato...
    method insert (line 205) | function insert($table, array $set) {
    method insertUpdate (line 225) | function insertUpdate($table, array $rows, array $primary) {
    method begin (line 235) | function begin() {
    method commit (line 239) | function commit() {
    method rollback (line 243) | function rollback() {
    method slowQuery (line 247) | function slowQuery($query, $timeout) {
  function support (line 255) | function support($feature) {
  function logged_user (line 259) | function logged_user() {
  function get_databases (line 264) | function get_databases($flush) {
  function collations (line 268) | function collations() {
  function db_collation (line 272) | function db_collation($db, $collations) {
  function tables_list (line 275) | function tables_list() {
  function table_status (line 286) | function table_status($name = "", $fast = false) {
  function explain (line 310) | function explain($connection, $query) {
  function error (line 313) | function error() {
  function information_schema (line 317) | function information_schema($db) {
  function indexes (line 320) | function indexes($table, $connection2 = null) {
  function fields (line 326) | function fields($table) {
  function foreign_keys (line 330) | function foreign_keys($table) {
  function table (line 334) | function table($idf) {
  function idf_escape (line 338) | function idf_escape($idf) {
  function limit (line 342) | function limit($query, $where, $limit, $offset = 0, $separator = " ") {
  function unconvert_field (line 346) | function unconvert_field($field, $return) {
  function fk_support (line 350) | function fk_support($table_status) {
  function alter_table (line 353) | function alter_table($table, $name, $fields, $foreign, $comment, $engine...
  function drop_tables (line 357) | function drop_tables($tables) {
  function count_tables (line 366) | function count_tables($databases) {
  function found_rows (line 372) | function found_rows($table_status, $where) {
  function last_id (line 376) | function last_id($result) {
  function sdb_request (line 379) | function sdb_request($action, $params = array()) {
  function sdb_request_all (line 422) | function sdb_request_all($action, $tag, $params = array(), $timeout = 0) {

FILE: plugins/dump-alter.php
  class AdminerDumpAlter (line 9) | class AdminerDumpAlter extends Adminer\Plugin {
    method dumpFormat (line 11) | function dumpFormat() {
    method dumpAlter (line 17) | private function dumpAlter() {
    method dumpDatabase (line 56) | function dumpDatabase($db) {
    method dumpTable (line 69) | function dumpTable($table, $style, $is_view = 0) {
    method dumpData (line 159) | function dumpData() {
    method dumpFooter (line 165) | function dumpFooter() {

FILE: plugins/dump-bz2.php
  class AdminerDumpBz2 (line 10) | class AdminerDumpBz2 extends Adminer\Plugin {
    method dumpOutput (line 13) | function dumpOutput() {
    method _bz2 (line 20) | function _bz2($string, $state) {
    method dumpHeaders (line 31) | function dumpHeaders($identifier, $multi_table = false) {

FILE: plugins/dump-date.php
  class AdminerDumpDate (line 9) | class AdminerDumpDate extends Adminer\Plugin {
    method dumpFilename (line 11) | function dumpFilename($identifier) {

FILE: plugins/dump-json.php
  class AdminerDumpJson (line 9) | class AdminerDumpJson extends Adminer\Plugin {
    method dumpFormat (line 12) | function dumpFormat() {
    method dumpTable (line 16) | function dumpTable($table, $style, $is_view = 0) {
    method dumpData (line 22) | function dumpData($table, $style, $query) {
    method dumpHeaders (line 48) | function dumpHeaders($identifier, $multi_table = false) {
    method dumpFooter (line 55) | function dumpFooter() {

FILE: plugins/dump-php.php
  class AdminerDumpPhp (line 8) | class AdminerDumpPhp extends Adminer\Plugin {
    method dumpFormat (line 11) | function dumpFormat() {
    method dumpHeaders (line 15) | function dumpHeaders() {
    method dumpTable (line 22) | function dumpTable($table, $style, $is_view = 0) {
    method dumpData (line 29) | function dumpData($table, $style, $query) {
    method dumpFooter (line 41) | function dumpFooter() {

FILE: plugins/dump-xml.php
  class AdminerDumpXml (line 9) | class AdminerDumpXml extends Adminer\Plugin {
    method dumpFormat (line 12) | function dumpFormat() {
    method dumpTable (line 16) | function dumpTable($table, $style, $is_view = 0) {
    method dumpData (line 22) | function dumpData($table, $style, $query) {
    method dumpHeaders (line 42) | function dumpHeaders($identifier, $multi_table = false) {
    method dumpFooter (line 49) | function dumpFooter() {

FILE: plugins/dump-zip.php
  class AdminerDumpZip (line 10) | class AdminerDumpZip extends Adminer\Plugin {
    method dumpOutput (line 13) | function dumpOutput() {
    method _zip (line 20) | function _zip($string, $state) {
    method dumpHeaders (line 36) | function dumpHeaders($identifier, $multi_table = false) {

FILE: plugins/edit-calendar.php
  class AdminerEditCalendar (line 11) | class AdminerEditCalendar extends Adminer\Plugin {
    method __construct (line 18) | function __construct($prepend = null, $langPath = "jquery-ui/i18n/jque...
    method head (line 23) | function head($dark = null) {
    method editInput (line 40) | function editInput($table, $field, $attrs, $value) {

FILE: plugins/edit-foreign.php
  class AdminerEditForeign (line 9) | class AdminerEditForeign extends Adminer\Plugin {
    method __construct (line 12) | function __construct($limit = 0) {
    method editInput (line 16) | function editInput($table, $field, $attrs, $value) {

FILE: plugins/edit-textarea.php
  class AdminerEditTextarea (line 9) | class AdminerEditTextarea extends Adminer\Plugin {
    method editInput (line 11) | function editInput($table, $field, $attrs, $value) {

FILE: plugins/editor-setup.php
  class AdminerEditorSetup (line 9) | class AdminerEditorSetup extends Adminer\Plugin {
    method __construct (line 19) | function __construct($driver = 'server', $server = null, $database = n...
    method loginFormField (line 25) | function loginFormField($name, $heading, $value) {
    method credentials (line 31) | function credentials() {
    method database (line 35) | function database() {

FILE: plugins/editor-views.php
  class AdminerEditorViews (line 9) | class AdminerEditorViews extends Adminer\Plugin {
    method tableName (line 11) | function tableName($tableStatus) {

FILE: plugins/email-table.php
  class AdminerEmailTable (line 9) | class AdminerEmailTable extends Adminer\Plugin {
    method __construct (line 19) | function __construct($table = "email", $id = "id", $title = "subject",...
    method selectEmailPrint (line 27) | function selectEmailPrint($emailFields, $columns) {
    method selectEmailProcess (line 49) | function selectEmailProcess($where, $foreignKeys) {

FILE: plugins/enum-option.php
  class AdminerEnumOption (line 9) | class AdminerEnumOption extends Adminer\Plugin {
    method editInput (line 11) | function editInput($table, $field, $attrs, $value) {

FILE: plugins/file-upload.php
  class AdminerFileUpload (line 10) | class AdminerFileUpload extends Adminer\Plugin {
    method __construct (line 18) | function __construct($uploadPath = "../static/data/", $displayPath = n...
    method editInput (line 24) | function editInput($table, $field, $attrs, $value) {
    method processInput (line 30) | function processInput($field, $value, $function = "") {
    method selectVal (line 46) | function selectVal($val, &$link, $field, $original) {

FILE: plugins/foreign-system.php
  class AdminerForeignSystem (line 9) | class AdminerForeignSystem extends Adminer\Plugin {
    method foreignKeys (line 11) | function foreignKeys($table) {
    method lowerCase (line 167) | private function lowerCase($value) {
    method schemata (line 171) | private function schemata($catalog, $schema = null) {
    method tables (line 175) | private function tables($catalog, $schema = null, $table_name = null) {
    method character_sets (line 180) | private function character_sets($source) {
    method collations (line 184) | private function collations($source) {

FILE: plugins/frames.php
  class AdminerFrames (line 9) | class AdminerFrames extends Adminer\Plugin {
    method __construct (line 15) | function __construct($sameOrigin = false) {
    method headers (line 19) | function headers() {

FILE: plugins/highlight-codemirror.php
  class AdminerHighlightCodemirror (line 10) | class AdminerHighlightCodemirror extends Adminer\Plugin {
    method __construct (line 14) | function __construct($root = "https://cdn.jsdelivr.net/npm/codemirror@...
    method syntaxHighlighting (line 19) | function syntaxHighlighting($tableStatuses) {
    method screenshot (line 101) | function screenshot() {

FILE: plugins/highlight-monaco.php
  class AdminerHighlightMonaco (line 10) | class AdminerHighlightMonaco extends Adminer\Plugin {
    method __construct (line 13) | function __construct($root = "https://cdn.jsdelivr.net/npm/monaco-edit...
    method syntaxHighlighting (line 17) | function syntaxHighlighting($tableStatuses) {

FILE: plugins/highlight-prism.php
  class AdminerHighlightPrism (line 10) | class AdminerHighlightPrism extends Adminer\Plugin {
    method __construct (line 15) | function __construct($editorRoot = "https://cdn.jsdelivr.net/npm/prism...
    method syntaxHighlighting (line 21) | function syntaxHighlighting($tableStatuses) {

FILE: plugins/json-column.php
  class AdminerJsonColumn (line 10) | class AdminerJsonColumn extends Adminer\Plugin {
    method testJson (line 11) | private function testJson($value) {
    method buildTable (line 18) | private function buildTable($json) {
    method editInput (line 42) | function editInput($table, $field, $attrs, $value) {

FILE: plugins/login-ip.php
  class AdminerLoginIp (line 9) | class AdminerLoginIp extends Adminer\Plugin {
    method __construct (line 16) | function __construct(array $ips, array $forwarded_for = array()) {
    method login (line 21) | function login($login, $password) {

FILE: plugins/login-otp.php
  class AdminerLoginOtp (line 9) | class AdminerLoginOtp extends Adminer\Plugin {
    method __construct (line 15) | function __construct($secret) {
    method loginFormField (line 22) | function loginFormField($name, $heading, $value) {
    method login (line 31) | function login($login, $password) {
    method getOtp (line 46) | function getOtp($timeSlot) {
    method screenshot (line 54) | function screenshot() {

FILE: plugins/login-password-less.php
  class AdminerLoginPasswordLess (line 9) | class AdminerLoginPasswordLess extends Adminer\Plugin {
    method __construct (line 15) | function __construct($password_hash) {
    method credentials (line 19) | function credentials() {
    method login (line 24) | function login($login, $password) {

FILE: plugins/login-servers.php
  class AdminerLoginServers (line 9) | class AdminerLoginServers extends Adminer\Plugin {
    method __construct (line 15) | function __construct(array $servers) {
    method credentials (line 23) | function credentials() {
    method login (line 27) | function login($login, $password) {
    method loginFormField (line 33) | function loginFormField($name, $heading, $value) {

FILE: plugins/login-ssl.php
  class AdminerLoginSsl (line 9) | class AdminerLoginSsl extends Adminer\Plugin {
    method __construct (line 17) | function __construct(array $ssl) {
    method connectSsl (line 21) | function connectSsl() {

FILE: plugins/login-table.php
  class AdminerLoginTable (line 18) | class AdminerLoginTable extends Adminer\Plugin {
    method __construct (line 22) | function __construct($database) {
    method login (line 26) | function login($login, $password) {

FILE: plugins/master-slave.php
  class AdminerMasterSlave (line 9) | class AdminerMasterSlave extends Adminer\Plugin {
    method __construct (line 15) | function __construct(array $masters) {
    method credentials (line 19) | function credentials() {
    method login (line 25) | function login($login, $password) {
    method messageQuery (line 32) | function messageQuery($query, $time, $failed = false) {

FILE: plugins/menu-links.php
  class AdminerMenuLinks (line 9) | class AdminerMenuLinks extends Adminer\Plugin {
    method __construct (line 13) | function __construct($menu = '') {
    method config (line 17) | function config() {
    method tablesPrint (line 28) | function tablesPrint(array $tables) {
    method screenshot (line 71) | function screenshot() {

FILE: plugins/pretty-json-column.php
  class AdminerPrettyJsonColumn (line 9) | class AdminerPrettyJsonColumn extends Adminer\Plugin {
    method testJson (line 10) | private function testJson($value) {
    method editInput (line 17) | function editInput($table, $field, $attrs, $value) {
    method processInput (line 25) | function processInput($field, $value, $function = '') {

FILE: plugins/row-numbers.php
  class AdminerRowNumbers (line 9) | class AdminerRowNumbers extends Adminer\Plugin {
    method backwardKeys (line 11) | function backwardKeys($table, $tableName) {
    method backwardKeysPrint (line 15) | function backwardKeysPrint($backwardKeys, $row) {

FILE: plugins/select-email.php
  class AdminerSelectEmail (line 9) | class AdminerSelectEmail extends Adminer\Plugin {
    method selectEmailPrint (line 11) | function selectEmailPrint($emailFields, $columns) {
    method selectEmailProcess (line 31) | function selectEmailProcess($where, $foreignKeys) {
    method emailHeader (line 67) | private function emailHeader($header) {
    method sendMail (line 75) | private function sendMail($email, $subject, $message, $from = "", arra...

FILE: plugins/slugify.php
  class AdminerSlugify (line 9) | class AdminerSlugify extends Adminer\Plugin {
    method __construct (line 16) | function __construct($from = 'áčďéěíňóřšťúůýž', $to = 'acdeeinorstuuyz...
    method editInput (line 21) | function editInput($table, $field, $attrs, $value) {

FILE: plugins/sql-gemini.php
  class AdminerSqlGemini (line 11) | class AdminerSqlGemini extends Adminer\Plugin {
    method __construct (line 19) | function __construct($apiKey = 'AIzaSyDWDbPjmvH9_hphsnY_yJGdue42qRMG3d...
    method headers (line 24) | function headers() {
    method sqlPrintAfter (line 51) | function sqlPrintAfter() {
    method screenshot (line 94) | function screenshot() {

FILE: plugins/sql-log.php
  class AdminerSqlLog (line 9) | class AdminerSqlLog extends Adminer\Plugin {
    method __construct (line 15) | function __construct($filename = "") {
    method messageQuery (line 19) | function messageQuery($query, $time, $failed = false) {
    method sqlCommandQuery (line 23) | function sqlCommandQuery($query) {
    method log (line 27) | private function log($query) {

FILE: plugins/table-indexes-structure.php
  class AdminerTableIndexesStructure (line 9) | class AdminerTableIndexesStructure extends Adminer\Plugin {
    method tableIndexesPrint (line 11) | function tableIndexesPrint($indexes, $tableStatus): bool {

FILE: plugins/table-structure.php
  class AdminerTableStructure (line 9) | class AdminerTableStructure extends Adminer\Plugin {
    method tableStructurePrint (line 14) | function tableStructurePrint(array $fields, $tableStatus = null): bool {

FILE: plugins/tables-filter.php
  class AdminerTablesFilter (line 9) | class AdminerTablesFilter extends Adminer\Plugin {
    method tablesPrint (line 10) | function tablesPrint($tables) {

FILE: plugins/timeout.php
  class AdminerTimeout (line 9) | class AdminerTimeout extends Adminer\Plugin {
    method __construct (line 15) | function __construct($seconds = 5) {
    method afterConnect (line 19) | function afterConnect() {
    method config (line 42) | function config() {

FILE: plugins/tinymce.php
  class AdminerTinymce (line 10) | class AdminerTinymce extends Adminer\Plugin {
    method __construct (line 13) | function __construct($path = "tiny_mce/tiny_mce.js") {
    method head (line 17) | function head($dark = null) {
    method selectVal (line 34) | function selectVal(&$val, $link, $field, $original) {
    method editInput (line 56) | function editInput($table, $field, $attrs, $value) {

FILE: plugins/translation.php
  class AdminerTranslation (line 19) | class AdminerTranslation extends Adminer\Plugin {
    method translate (line 21) | private function translate($idf) {
    method tableName (line 40) | function tableName(&$tableStatus) {
    method fieldName (line 44) | function fieldName(&$field, $order = 0) {
    method editVal (line 48) | function editVal(&$val, $field) {

FILE: plugins/version-github.php
  class AdminerVersionGithub (line 9) | class AdminerVersionGithub extends Adminer\Plugin {
    method head (line 11) | function head($dark = null) {
    method csp (line 28) | function csp(&$csp) {

FILE: plugins/version-noverify.php
  class AdminerVersionNoverify (line 9) | class AdminerVersionNoverify extends Adminer\Plugin {
    method head (line 11) | function head($dark = null) {
Condensed preview — 261 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,400K chars).
[
  {
    "path": ".editorconfig",
    "chars": 310,
    "preview": "# https://editorconfig.org/\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_"
  },
  {
    "path": ".gitattributes",
    "chars": 154,
    "preview": "/.gitattributes export-ignore\n/.github export-ignore\n/.gitignore export-ignore\n/.gitmodules export-ignore\n/.travis.yml e"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 108,
    "preview": "github: vrana\npatreon: jakubvrana\ncustom: [\"https://www.paypal.com/donate/?hosted_button_id=6PK5VNUCFT3FG\"]\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 585,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Adminer versio"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 342,
    "preview": "name: CI\n\non:\n  pull_request:\n    branches: [ master ]\n  workflow_dispatch:\n\njobs:\n  build-test:\n    runs-on: ubuntu-lat"
  },
  {
    "path": ".gitignore",
    "chars": 219,
    "preview": "/adminer/adminer.css\n/adminer/adminer-dark.css\n/editor/adminer.css\n/editor/adminer-dark.css\n/adminer*.php\n/editor*.php\n/"
  },
  {
    "path": ".gitmodules",
    "chars": 264,
    "preview": "[submodule \"jush\"]\n\tpath = externals/jush\n\turl = https://github.com/vrana/jush\n[submodule \"JsShrink\"]\n\tpath = externals/"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 54327,
    "preview": "## Adminer dev\n- Tables overview: allow sorting (bug #1231)\n- Select: Disable Ctrl+click inline edit without UPDATE priv"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 646,
    "preview": "- Reproducible [bug reports](https://github.com/vrana/adminer/issues/new?template=bug_report.md) are warmly welcomed.\n- "
  },
  {
    "path": "LICENSE",
    "chars": 28,
    "preview": "Apache License 2.0 or GPL 2\n"
  },
  {
    "path": "Makefile",
    "chars": 582,
    "preview": "ROOT_DIRECTORY = $(shell dirname \"$(realpath $(lastword $(MAKEFILE_LIST)))\")\nPHP := $(shell which php)\nPORT := 8000\n\n\n.D"
  },
  {
    "path": "README.md",
    "chars": 1144,
    "preview": "# Adminer\n**Adminer** is a full-featured database management tool written in PHP. It consists of a single file ready to "
  },
  {
    "path": "SECURITY.md",
    "chars": 649,
    "preview": "# Security Policy\n\n## Supported Versions\n\nOnly the latest published version and the latest development version (last com"
  },
  {
    "path": "adminer/call.inc.php",
    "chars": 3313,
    "preview": "<?php\nnamespace Adminer;\n\n$PROCEDURE = ($_GET[\"name\"] ?: $_GET[\"call\"]);\npage_header(lang('Call') . \": \" . h($PROCEDURE)"
  },
  {
    "path": "adminer/check.inc.php",
    "chars": 1854,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"check\"];\n$name = $_GET[\"name\"];\n$row = $_POST;\n\nif ($row && !$error) {\n\tif (JU"
  },
  {
    "path": "adminer/create.inc.php",
    "chars": 9006,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"create\"];\n$partition_by = driver()->partitionBy;\n$partitions_info = ($partitio"
  },
  {
    "path": "adminer/database.inc.php",
    "chars": 2872,
    "preview": "<?php\nnamespace Adminer;\n\n$row = $_POST;\n\nif ($_POST && !$error && !$_POST[\"add\"]) {\n\t$name = trim($row[\"name\"]);\n\tif ($"
  },
  {
    "path": "adminer/db.inc.php",
    "chars": 14338,
    "preview": "<?php\nnamespace Adminer;\n\n$tables_views = array_merge((array) $_POST[\"tables\"], (array) $_POST[\"views\"]);\n\nif ($tables_v"
  },
  {
    "path": "adminer/designs.php",
    "chars": 303,
    "preview": "<?php\nfunction adminer_object() {\n\tinclude_once \"../plugins/designs.php\";\n\t$designs = array();\n\tforeach (glob(\"../design"
  },
  {
    "path": "adminer/download.inc.php",
    "chars": 543,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"download\"];\n$fields = fields($TABLE);\nheader(\"Content-Type: application/octet-"
  },
  {
    "path": "adminer/drivers/mssql.inc.php",
    "chars": 24016,
    "preview": "<?php\n/**\n* @author Jakub Cernohuby\n* @author Vladimir Stastka\n* @author Jakub Vrana\n*/\n\nnamespace Adminer;\n\nadd_driver("
  },
  {
    "path": "adminer/drivers/mysql.inc.php",
    "chars": 38901,
    "preview": "<?php\nnamespace Adminer;\n\nSqlDriver::$drivers = array(\"server\" => \"MySQL / MariaDB\") + SqlDriver::$drivers;\n\nif (!define"
  },
  {
    "path": "adminer/drivers/oracle.inc.php",
    "chars": 15948,
    "preview": "<?php\nnamespace Adminer;\n\nadd_driver(\"oracle\", \"Oracle (beta)\");\n\nif (isset($_GET[\"oracle\"])) {\n\tdefine('Adminer\\DRIVER'"
  },
  {
    "path": "adminer/drivers/pgsql.inc.php",
    "chars": 38351,
    "preview": "<?php\nnamespace Adminer;\n\nadd_driver(\"pgsql\", \"PostgreSQL\");\n\nif (isset($_GET[\"pgsql\"])) {\n\tdefine('Adminer\\DRIVER', \"pg"
  },
  {
    "path": "adminer/drivers/sqlite.inc.php",
    "chars": 23338,
    "preview": "<?php\nnamespace Adminer;\n\nadd_driver(\"sqlite\", \"SQLite\");\n\nif (isset($_GET[\"sqlite\"])) {\n\tdefine('Adminer\\DRIVER', \"sqli"
  },
  {
    "path": "adminer/dump.inc.php",
    "chars": 8684,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"dump\"];\n\nif ($_POST && !$error) {\n\t$default = array(\"auto_increment\" => '');\n\t"
  },
  {
    "path": "adminer/edit.inc.php",
    "chars": 3222,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"edit\"];\n$fields = fields($TABLE);\n$where = (isset($_GET[\"select\"])\n\t? ($_POST["
  },
  {
    "path": "adminer/elastic.php",
    "chars": 465,
    "preview": "<?php\n// To create Adminer just for Elasticsearch, run `../compile.php elastic`.\n\nfunction adminer_object() {\n\tinclude_o"
  },
  {
    "path": "adminer/event.inc.php",
    "chars": 3225,
    "preview": "<?php\nnamespace Adminer;\n\n$EVENT = $_GET[\"event\"];\n$intervals = array(\"YEAR\", \"QUARTER\", \"MONTH\", \"DAY\", \"HOUR\", \"MINUTE"
  },
  {
    "path": "adminer/file.inc.php",
    "chars": 1791,
    "preview": "<?php\nnamespace Adminer;\n\nif (substr(VERSION, -4) != '-dev') {\n\tif ($_SERVER[\"HTTP_IF_MODIFIED_SINCE\"]) {\n\t\theader(\"HTTP"
  },
  {
    "path": "adminer/foreign.inc.php",
    "chars": 4755,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"foreign\"];\n$name = $_GET[\"name\"];\n$row = $_POST;\n\nif ($_POST && !$error && !$_"
  },
  {
    "path": "adminer/include/adminer.inc.php",
    "chars": 43280,
    "preview": "<?php\nnamespace Adminer;\n\n// any method change in this file should be transferred to editor/include/adminer.inc.php\n\n/**"
  },
  {
    "path": "adminer/include/auth.inc.php",
    "chars": 8522,
    "preview": "<?php\nnamespace Adminer;\n\n$permanent = array();\nif ($_COOKIE[\"adminer_permanent\"]) {\n\tforeach (explode(\" \", $_COOKIE[\"ad"
  },
  {
    "path": "adminer/include/bootstrap.inc.php",
    "chars": 4115,
    "preview": "<?php\nnamespace Adminer;\n\ninclude \"../adminer/include/version.inc.php\";\ninclude \"../adminer/include/errors.inc.php\";\n// "
  },
  {
    "path": "adminer/include/connect.inc.php",
    "chars": 5075,
    "preview": "<?php\nnamespace Adminer;\n\nif (isset($_GET[\"status\"])) {\n\t$_GET[\"variables\"] = $_GET[\"status\"];\n}\nif (isset($_GET[\"import"
  },
  {
    "path": "adminer/include/coverage.inc.php",
    "chars": 737,
    "preview": "<?php\nnamespace Adminer;\n\n// coverage is used in tests and removed in compilation\nif (extension_loaded(\"xdebug\") && file"
  },
  {
    "path": "adminer/include/db.inc.php",
    "chars": 1630,
    "preview": "<?php\nnamespace Adminer;\n\n// this could be interface when \"Db extends \\mysqli\" can have compatible type declarations (PH"
  },
  {
    "path": "adminer/include/design.inc.php",
    "chars": 7604,
    "preview": "<?php\nnamespace Adminer;\n\n/** Print HTML header\n* @param string $title used in title, breadcrumb and heading, should be "
  },
  {
    "path": "adminer/include/driver.inc.php",
    "chars": 9897,
    "preview": "<?php\nnamespace Adminer;\n\n/** Add or overwrite a driver */\nfunction add_driver(string $id, string $name): void {\n\tSqlDri"
  },
  {
    "path": "adminer/include/editing.inc.php",
    "chars": 22959,
    "preview": "<?php\nnamespace Adminer;\n\n// This file is not used in Adminer Editor.\n\n/** Print select result\n* @param Result $result\n*"
  },
  {
    "path": "adminer/include/errors.inc.php",
    "chars": 444,
    "preview": "<?php\nnamespace Adminer;\n\nerror_reporting(24575); // all but E_DEPRECATED (overriding mysqli methods without types is de"
  },
  {
    "path": "adminer/include/functions.inc.php",
    "chars": 28968,
    "preview": "<?php\nnamespace Adminer;\n\n// This file is used both in Adminer and Adminer Editor.\n\n/** Get database connection\n* @param"
  },
  {
    "path": "adminer/include/html.inc.php",
    "chars": 19615,
    "preview": "<?php\nnamespace Adminer;\n\n/** Return <script> element */\nfunction script(string $source, string $trailing = \"\\n\"): strin"
  },
  {
    "path": "adminer/include/lang.inc.php",
    "chars": 6943,
    "preview": "<?php\nnamespace Adminer;\n\n/** Translate string\n* @param literal-string $idf\n* @param float|string $number\n*/\nfunction la"
  },
  {
    "path": "adminer/include/pdo.inc.php",
    "chars": 2729,
    "preview": "<?php\nnamespace Adminer;\n\n// PDO can be used in several database drivers\nif (extension_loaded('pdo')) {\n\tabstract class "
  },
  {
    "path": "adminer/include/plugin.inc.php",
    "chars": 941,
    "preview": "<?php\nnamespace Adminer;\n\n// the overridable methods don't use return type declarations so that plugins can be compatibl"
  },
  {
    "path": "adminer/include/plugins.inc.php",
    "chars": 3203,
    "preview": "<?php\nnamespace Adminer;\n\nclass Plugins {\n\t/** @var true[] */ private static array $append = array('dumpFormat' => true,"
  },
  {
    "path": "adminer/include/tmpfile.inc.php",
    "chars": 428,
    "preview": "<?php\nnamespace Adminer;\n\nclass TmpFile {\n\t/** @var resource */ private $handler;\n\t/** @visibility protected(set) */ pub"
  },
  {
    "path": "adminer/include/version.inc.php",
    "chars": 55,
    "preview": "<?php\nnamespace Adminer;\n\nconst VERSION = \"5.4.3-dev\";\n"
  },
  {
    "path": "adminer/include/xxtea.inc.php",
    "chars": 2413,
    "preview": "<?php\nnamespace Adminer;\n\n/** PHP implementation of XXTEA encryption algorithm\n* @author Ma Bingyao <andot@ujn.edu.cn>\n*"
  },
  {
    "path": "adminer/index.php",
    "chars": 2558,
    "preview": "<?php\n/** Adminer - Compact database management\n* @link https://www.adminer.org/\n* @author Jakub Vrana, https://www.vran"
  },
  {
    "path": "adminer/indexes.inc.php",
    "chars": 6767,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"indexes\"];\n$index_types = array(\"PRIMARY\", \"UNIQUE\", \"INDEX\");\n$table_status ="
  },
  {
    "path": "adminer/lang/ar.inc.php",
    "chars": 9928,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'تسجيل الدخول',\n\t'Logout successful.' => 'تم تسجيل ال"
  },
  {
    "path": "adminer/lang/bg.inc.php",
    "chars": 13692,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/bn.inc.php",
    "chars": 14490,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'লগইন',\n\t'Logout successful.' => 'সফলভাবে লগআউট হয়েছে"
  },
  {
    "path": "adminer/lang/bs.inc.php",
    "chars": 12246,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/ca.inc.php",
    "chars": 11469,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Inicia la sessió',\n\t'Logout successful.' => 'Desconn"
  },
  {
    "path": "adminer/lang/cs.inc.php",
    "chars": 15563,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/da.inc.php",
    "chars": 11450,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'System' => 'System',\n\t'Server' => 'Server',\n\t'Username' => 'Bru"
  },
  {
    "path": "adminer/lang/de.inc.php",
    "chars": 14831,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Login',\n\t'Logout successful.' => 'Abmeldung erfolgre"
  },
  {
    "path": "adminer/lang/el.inc.php",
    "chars": 13883,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/en.inc.php",
    "chars": 1130,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Too many unsuccessful logins, try again in %d minute(s).' => ar"
  },
  {
    "path": "adminer/lang/es.inc.php",
    "chars": 13687,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Login',\n\t'Logout successful.' => 'Sesión finalizada "
  },
  {
    "path": "adminer/lang/et.inc.php",
    "chars": 11261,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Logi sisse',\n\t'Logout successful.' => 'Väljalogimine"
  },
  {
    "path": "adminer/lang/fa.inc.php",
    "chars": 12054,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/fi.inc.php",
    "chars": 14581,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/fr.inc.php",
    "chars": 14411,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Authentification',\n\t'Logout successful.' => 'Au revo"
  },
  {
    "path": "adminer/lang/gl.inc.php",
    "chars": 12769,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Conectar',\n\t'Logout successful.' => 'Pechouse a sesi"
  },
  {
    "path": "adminer/lang/he.inc.php",
    "chars": 10852,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'התחברות',\n\t'Logout successful.' => 'ההתחברות הצליחה'"
  },
  {
    "path": "adminer/lang/hi.inc.php",
    "chars": 13939,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'लॉगिन',\n\t'Logout successful.' => 'सफलतापूर्वक लॉगआउट"
  },
  {
    "path": "adminer/lang/hr.inc.php",
    "chars": 15693,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/hu.inc.php",
    "chars": 10836,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Belépés',\n\t'Logout successful.' => 'Sikeres kilépés."
  },
  {
    "path": "adminer/lang/id.inc.php",
    "chars": 11357,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/it.inc.php",
    "chars": 13489,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Autenticazione',\n\t'Logout successful.' => 'Uscita ef"
  },
  {
    "path": "adminer/lang/ja.inc.php",
    "chars": 11452,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'ログイン',\n\t'Logout successful.' => 'ログアウトしました。',\n\t'Inva"
  },
  {
    "path": "adminer/lang/ka.inc.php",
    "chars": 13227,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'შესვლა',\n\t'Logout successful.' => 'გამოხვედით სისტემ"
  },
  {
    "path": "adminer/lang/ko.inc.php",
    "chars": 8980,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'$1-$3-$5' => '$1-$3-$5',\n\t'%.3f s' => '%.3f 초',\n\t'%d byte(s)' ="
  },
  {
    "path": "adminer/lang/lt.inc.php",
    "chars": 11918,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/lv.inc.php",
    "chars": 13707,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Ieiet',\n\t'Logout successful.' => 'Jūs veiksmīgi izgā"
  },
  {
    "path": "adminer/lang/ms.inc.php",
    "chars": 13313,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/nl.inc.php",
    "chars": 13515,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Aanmelden',\n\t'Logout successful.' => 'Successvol afg"
  },
  {
    "path": "adminer/lang/no.inc.php",
    "chars": 11542,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'System' => 'System',\n\t'Server' => 'Server',\n\t'Username' => 'Bru"
  },
  {
    "path": "adminer/lang/pl.inc.php",
    "chars": 16061,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/pt-br.inc.php",
    "chars": 11027,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Entrar',\n\t'Logout successful.' => 'Saída bem sucedid"
  },
  {
    "path": "adminer/lang/pt.inc.php",
    "chars": 10904,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Entrar',\n\t'Logout successful.' => 'Sessão terminada "
  },
  {
    "path": "adminer/lang/ro.inc.php",
    "chars": 11403,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Intră',\n\t'Logout successful.' => 'Ați ieșit cu succe"
  },
  {
    "path": "adminer/lang/ru.inc.php",
    "chars": 14961,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Войти',\n\t'Logout successful.' => 'Вы успешно покинул"
  },
  {
    "path": "adminer/lang/sk.inc.php",
    "chars": 14319,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'Prihlásiť sa',\n\t'Logout successful.' => 'Odhlásenie "
  },
  {
    "path": "adminer/lang/sl.inc.php",
    "chars": 12020,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/sr.inc.php",
    "chars": 12028,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/sv.inc.php",
    "chars": 14312,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/ta.inc.php",
    "chars": 12492,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'நுழை',\n\t'Logout successful.' => 'வெற்றிக‌ர‌மாய் வெளி"
  },
  {
    "path": "adminer/lang/th.inc.php",
    "chars": 10479,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t'Login' => 'เข้าสู่ระบบ',\n\t'Logout successful.' => 'ออกจากระบบเร"
  },
  {
    "path": "adminer/lang/tr.inc.php",
    "chars": 13642,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/uk.inc.php",
    "chars": 15528,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/uz.inc.php",
    "chars": 16109,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/vi.inc.php",
    "chars": 11948,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/xx.inc.php",
    "chars": 10859,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/zh-tw.inc.php",
    "chars": 10901,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/lang/zh.inc.php",
    "chars": 10719,
    "preview": "<?php\nnamespace Adminer;\n\nLang::$translations = array(\n\t// label for database system selection (MySQL, SQLite, ...)\n\t'Sy"
  },
  {
    "path": "adminer/privileges.inc.php",
    "chars": 1280,
    "preview": "<?php\nnamespace Adminer;\n\npage_header(lang('Privileges'));\n\necho '<p class=\"links\"><a href=\"' . h(ME) . 'user=\">' . lang"
  },
  {
    "path": "adminer/procedure.inc.php",
    "chars": 2584,
    "preview": "<?php\nnamespace Adminer;\n\n$PROCEDURE = ($_GET[\"name\"] ?: $_GET[\"procedure\"]);\n$routine = (isset($_GET[\"function\"]) ? \"FU"
  },
  {
    "path": "adminer/processlist.inc.php",
    "chars": 1941,
    "preview": "<?php\nnamespace Adminer;\n\nif (support(\"kill\")) {\n\tif ($_POST && !$error) {\n\t\t$killed = 0;\n\t\tforeach ((array) $_POST[\"kil"
  },
  {
    "path": "adminer/schema.inc.php",
    "chars": 5126,
    "preview": "<?php\nnamespace Adminer;\n\npage_header(lang('Database schema'), \"\", array(), h(DB . ($_GET[\"ns\"] ? \".$_GET[ns]\" : \"\")));\n"
  },
  {
    "path": "adminer/scheme.inc.php",
    "chars": 1181,
    "preview": "<?php\nnamespace Adminer;\n\n$row = $_POST;\n\nif ($_POST && !$error) {\n\t$link = preg_replace('~ns=[^&]*&~', '', ME) . \"ns=\";"
  },
  {
    "path": "adminer/script.inc.php",
    "chars": 1617,
    "preview": "<?php\nnamespace Adminer;\n\nheader(\"Content-Type: text/javascript; charset=utf-8\");\n\nif ($_GET[\"script\"] == \"db\") {\n\t$sums"
  },
  {
    "path": "adminer/select.inc.php",
    "chars": 24286,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"select\"];\n$table_status = table_status1($TABLE);\n$indexes = indexes($TABLE);\n$"
  },
  {
    "path": "adminer/sequence.inc.php",
    "chars": 1130,
    "preview": "<?php\nnamespace Adminer;\n\n$SEQUENCE = $_GET[\"sequence\"];\n$row = $_POST;\n\nif ($_POST && !$error) {\n\t$link = substr(ME, 0,"
  },
  {
    "path": "adminer/sql.inc.php",
    "chars": 12094,
    "preview": "<?php\nnamespace Adminer;\n\nif (!$error && $_POST[\"export\"]) {\n\tsave_settings(array(\"output\" => $_POST[\"output\"], \"format\""
  },
  {
    "path": "adminer/sqlite.php",
    "chars": 339,
    "preview": "<?php\nfunction adminer_object() {\n\tinclude_once \"../plugins/login-password-less.php\";\n\treturn new Adminer\\Plugins(array("
  },
  {
    "path": "adminer/static/dark.css",
    "chars": 1851,
    "preview": "/** @author Robert Mesaros, https://www.rmsoft.sk */\n\nhtml {\n\t--bg: #002240;\n\t--fg: #829bb0;\n\t--dim: #154269;\n\t--lit: #0"
  },
  {
    "path": "adminer/static/default.css",
    "chars": 8132,
    "preview": "/** @author Ondrej Valka, http://valka.info */\n\nhtml {\n\t--bg: #fff;\n\t--fg: #000;\n\t--dim: #eee;\n\t--lit: #ddf;\n}\n\nbody { c"
  },
  {
    "path": "adminer/static/editing.js",
    "chars": 22114,
    "preview": "'use strict'; // Adminer specific functions\n\nlet autocompleter; // set in adminer.inc.php\n\n/** Load syntax highlighting\n"
  },
  {
    "path": "adminer/static/functions.js",
    "chars": 19412,
    "preview": "'use strict';\n\n/** Get first element by selector\n* @param string\n* @param [HTMLElement] defaults to document\n* @return H"
  },
  {
    "path": "adminer/table.inc.php",
    "chars": 5008,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"table\"];\n$fields = fields($TABLE);\nif (!$fields) {\n\t$error = error() ?: lang('"
  },
  {
    "path": "adminer/trigger.inc.php",
    "chars": 2450,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"trigger\"];\n$name = \"$_GET[name]\";\n$trigger_options = trigger_options();\n$row ="
  },
  {
    "path": "adminer/type.inc.php",
    "chars": 1146,
    "preview": "<?php\nnamespace Adminer;\n\n$TYPE = $_GET[\"type\"];\n$row = $_POST;\n\nif ($_POST && !$error) {\n\t$link = substr(ME, 0, -1);\n\ti"
  },
  {
    "path": "adminer/user.inc.php",
    "chars": 7815,
    "preview": "<?php\nnamespace Adminer;\n\n$USER = $_GET[\"user\"];\n$privileges = array(\"\" => array(\"All privileges\" => \"\"));\nforeach (get_"
  },
  {
    "path": "adminer/variables.inc.php",
    "chars": 565,
    "preview": "<?php\nnamespace Adminer;\n\n$status = isset($_GET[\"status\"]);\npage_header($status ? lang('Status') : lang('Variables'));\n\n"
  },
  {
    "path": "adminer/view.inc.php",
    "chars": 2003,
    "preview": "<?php\nnamespace Adminer;\n\n$TABLE = $_GET[\"view\"];\n$row = $_POST;\n$orig_type = \"VIEW\";\nif (JUSH == \"pgsql\" && $TABLE != \""
  },
  {
    "path": "compile.php",
    "chars": 14838,
    "preview": "#!/usr/bin/env php\n<?php\ninclude __DIR__ . \"/adminer/include/version.inc.php\";\ninclude __DIR__ . \"/adminer/include/error"
  },
  {
    "path": "composer.json",
    "chars": 1030,
    "preview": "{\n    \"name\": \"vrana/adminer\",\n    \"description\": \"Database management in a single PHP file.\",\n    \"homepage\": \"https://"
  },
  {
    "path": "coverage.php",
    "chars": 2900,
    "preview": "<!DOCTYPE html>\n<html lang=\"cs\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>Cov"
  },
  {
    "path": "designs/README.md",
    "chars": 284,
    "preview": "Copy `adminer.css` alongside Adminer PHP script to use an alternative design.\nIf the design supports dark mode then it s"
  },
  {
    "path": "designs/adminer-dark/README.md",
    "chars": 81,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/screenshots/dark.png)\n"
  },
  {
    "path": "designs/adminer-dark/adminer-dark.css",
    "chars": 87,
    "preview": "/* Empty file named adminer-dark.css causes Adminer to switch to default dark mode. */\n"
  },
  {
    "path": "designs/brade/README.md",
    "chars": 89,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/brade/screenshot.png)\n"
  },
  {
    "path": "designs/brade/adminer.css",
    "chars": 3794,
    "preview": "/* CSS by Brade - www.bradezone.com */\nhtml {\n\t--fg: #333;\n}\n\n*{margin:0;padding:0}\nbody{font:13px/18px Helvetica,Arial,"
  },
  {
    "path": "designs/bueltge/README.md",
    "chars": 91,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/bueltge/screenshot.png)\n"
  },
  {
    "path": "designs/bueltge/adminer.css",
    "chars": 9221,
    "preview": "/**\r\n * Alternative style for Adminer by Frank Bültge\r\n *\r\n * @link     http://bueltge.de/\r\n * @version  02/18/2014\r\n */"
  },
  {
    "path": "designs/dracula/README.md",
    "chars": 91,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/dracula/screenshot.png)\n"
  },
  {
    "path": "designs/dracula/adminer-dark.css",
    "chars": 12999,
    "preview": "/*\n * Theme by Douglas Damasio [http://github.com/douglasdamasio]\n * Based on Pepa Linha\n * Color syntax inspired by Dra"
  },
  {
    "path": "designs/esterka/README.md",
    "chars": 91,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/esterka/screenshot.png)\n"
  },
  {
    "path": "designs/esterka/adminer.css",
    "chars": 3389,
    "preview": "* {\n\tfont: 11px/1.25 Verdana, 'Geneva CE', lucida, sans-serif;\n\tcolor:#333333;\n\tmargin:0px;\n\tpadding:0px;\n}\n\na,a:visited"
  },
  {
    "path": "designs/flat/README.md",
    "chars": 88,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/flat/screenshot.png)\n"
  },
  {
    "path": "designs/flat/adminer.css",
    "chars": 1372,
    "preview": "/**\n * Adminer \"flat\" theme by Israel Viana\n *\n * Color palette from https://kuler.adobe.com/Copy-of-Flat-UI-color-theme"
  },
  {
    "path": "designs/galkaev/README.md",
    "chars": 91,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/galkaev/screenshot.png)\n"
  },
  {
    "path": "designs/galkaev/adminer-dark.css",
    "chars": 15734,
    "preview": "/** theme \"easy on the eyes\" for Adminer by p.galkaev@miraidenshi-tech.jp */\r\n\r\nhtml {\r\n\t--bg: black;\r\n\t--fg: #ccc;\r\n}\r\n"
  },
  {
    "path": "designs/haeckel/README.md",
    "chars": 91,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/haeckel/screenshot.png)\n"
  },
  {
    "path": "designs/haeckel/adminer.css",
    "chars": 41354,
    "preview": "/**\n * Alternative style for Adminer.\n *\n * Klemens Häckel [http://clickdimension.wordpress.com/]\n *\n * new remaster bas"
  },
  {
    "path": "designs/hever/README.md",
    "chars": 89,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/hever/screenshot.png)\n"
  },
  {
    "path": "designs/hever/adminer.css",
    "chars": 28754,
    "preview": "/*\r\nTheme by Hever [http://hev.cz] - September 2019, ver 0.2.5\r\nUsed Silk icon set 1.3 by Mark James - http://www.famfam"
  },
  {
    "path": "designs/konya/README.md",
    "chars": 89,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/konya/screenshot.png)\n"
  },
  {
    "path": "designs/konya/adminer.css",
    "chars": 27692,
    "preview": "/* Merged and fixed version of Hever's and Frank Bueltge's skins by Oguz KONYA. I liked Bueltge's skin but I wanted the "
  },
  {
    "path": "designs/lavender-light/README.md",
    "chars": 98,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/lavender-light/screenshot.png)\n"
  },
  {
    "path": "designs/lavender-light/adminer.css",
    "chars": 5315,
    "preview": "/**\n * lavender-light theme for Adminer\n * by Alex Yu\n *\n * Color palette from:\n * https://color.adobe.com/Lavender-v2-c"
  },
  {
    "path": "designs/lucas-sandery/README.md",
    "chars": 97,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/lucas-sandery/screenshot.png)\n"
  },
  {
    "path": "designs/lucas-sandery/adminer.css",
    "chars": 25423,
    "preview": "/*\nA colourful, RTL-friendly theme.\nUpdate from https://github.com/lucas-sandery/adminer/raw/master/designs/lucas-sander"
  },
  {
    "path": "designs/mancave/README.md",
    "chars": 91,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/mancave/screenshot.png)\n"
  },
  {
    "path": "designs/mancave/adminer-dark.css",
    "chars": 20968,
    "preview": "/*\n\n  VERSION: adminer-theme-mancave2-2.1.alpha\n\n  AUTHORS: panreach@gmail.com, dev@monolithforge.com //NOTE: CREDITS be"
  },
  {
    "path": "designs/mvt/README.md",
    "chars": 87,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/mvt/screenshot.png)\n"
  },
  {
    "path": "designs/mvt/adminer.css",
    "chars": 24774,
    "preview": "/**\n* Adminer theme by Aleksey M. (alekseymvt@gmail.com)\n* @link https://github.com/alekseymvt/Adminer.theme\n* @link htt"
  },
  {
    "path": "designs/nette/README.md",
    "chars": 89,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/nette/screenshot.png)\n"
  },
  {
    "path": "designs/nette/adminer.css",
    "chars": 28207,
    "preview": "/* Theme \"Nette\" for Adminer, (c) David Grudl */\r\n\r\n/*\r\nit is based on some parts of:\r\n- Nette Framework design - http:/"
  },
  {
    "path": "designs/ng9/README.md",
    "chars": 87,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/ng9/screenshot.png)\n"
  },
  {
    "path": "designs/ng9/adminer.css",
    "chars": 3610,
    "preview": "* {\r\n\tfont: 13px/1.5 Verdana, 'Geneva CE', lucida, sans-serif;\r\n\tcolor:#333333;\r\n\tmargin:0px;\r\n\tpadding:0px;\r\n}\r\n\r\na,a:v"
  },
  {
    "path": "designs/nicu/README.md",
    "chars": 88,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/nicu/screenshot.png)\n"
  },
  {
    "path": "designs/nicu/adminer.css",
    "chars": 8909,
    "preview": "/* CSS by Nicu I. - www.nicu.me */\n@import url('//fonts.googleapis.com/css?family=Roboto:400,700,300');\nbody {\n    font:"
  },
  {
    "path": "designs/pappu687/README.md",
    "chars": 92,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/pappu687/screenshot.png)\n"
  },
  {
    "path": "designs/pappu687/adminer.css",
    "chars": 71621,
    "preview": "/*\r\nFLAT UI Flavored Adminer Theme by M. Mahbubur Rahman (mahbub@mahbubblog.com)\r\nScreenshot : http://d.pr/i/cznH\r\nBased"
  },
  {
    "path": "designs/paranoiq/README.md",
    "chars": 92,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/paranoiq/screenshot.png)\n"
  },
  {
    "path": "designs/paranoiq/adminer.css",
    "chars": 7929,
    "preview": "/**\r\n * Alternative style for Adminer. Zrobeno 7.4.2011\r\n * @author Vlasta Neubauer [@paranoiq]\r\n */\r\n\r\n/* -- fonts ----"
  },
  {
    "path": "designs/pepa-linha/README.md",
    "chars": 94,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/pepa-linha/screenshot.png)\n"
  },
  {
    "path": "designs/pepa-linha/adminer.css",
    "chars": 8969,
    "preview": "/*\n * Theme by Pepa Linha [http://webdream.cz]\n * JUSH color syntax inspired by NetBeans\n */\n\nhtml,\nbody {\n\theight: 100%"
  },
  {
    "path": "designs/pokorny/README.md",
    "chars": 91,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/pokorny/screenshot.png)\n"
  },
  {
    "path": "designs/pokorny/adminer.css",
    "chars": 33894,
    "preview": "/**\r\n * Alternative style for Adminer.\r\n * Created by Miroslav Pokorný [http://fuch.cz].\r\n * Icons by Yusuke Kamiyamane "
  },
  {
    "path": "designs/price/README.md",
    "chars": 89,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/price/screenshot.png)\n"
  },
  {
    "path": "designs/price/adminer.css",
    "chars": 21753,
    "preview": "/**\r\n * @package    Adminer.css - v1.0.0 - January 08, 2013\r\n * @author     James Price\r\n * @version    $Id$\r\n * @copyri"
  },
  {
    "path": "designs/rmsoft/README.md",
    "chars": 90,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/rmsoft/screenshot.png)\n"
  },
  {
    "path": "designs/rmsoft/adminer.css",
    "chars": 69306,
    "preview": "/*!\n * @package    Adminer.css - Theme CSS for Adminer   ---   [theme light]   gray - orange    B  (with icons)\n * @vers"
  },
  {
    "path": "designs/rmsoft_blue/README.md",
    "chars": 95,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/rmsoft_blue/screenshot.png)\n"
  },
  {
    "path": "designs/rmsoft_blue/adminer.css",
    "chars": 69364,
    "preview": "/*!\n * @package    Adminer.css - Theme CSS for Adminer   ---   [theme light]   blue    B  (with icons)\n * @version    5."
  },
  {
    "path": "designs/rmsoft_blue-dark/README.md",
    "chars": 100,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/rmsoft_blue-dark/screenshot.png)\n"
  },
  {
    "path": "designs/rmsoft_blue-dark/adminer.css",
    "chars": 69531,
    "preview": "/*!\n * @package    Adminer.css - Theme CSS for Adminer   ---   [theme dark]   blue    B  (with icons)\n * @version    5.1"
  },
  {
    "path": "designs/win98/README.md",
    "chars": 89,
    "preview": "## Screenshot\n![screenshot](https://www.adminer.org/static/designs/win98/screenshot.png)\n"
  },
  {
    "path": "designs/win98/adminer.css",
    "chars": 8833,
    "preview": "/* inspired by https://github.com/jdan/98.css */\n\n:root {\n    --text-color: #222222;\n    --button-face: #dfdfdf;\n    --w"
  },
  {
    "path": "developing.md",
    "chars": 18815,
    "preview": "# Notes for Developers\n\nJakub Vrána\n\n## Request Lifecycle\n\nThe request lifecycle is straightforward.\nAdminer loads a dat"
  },
  {
    "path": "editor/db.inc.php",
    "chars": 1413,
    "preview": "<?php\nnamespace Adminer;\n\npage_header(lang('Server'), \"\", false);\n\nif (adminer()->homepage()) {\n\techo \"<form action='' m"
  },
  {
    "path": "editor/example.php",
    "chars": 1233,
    "preview": "<?php\nfunction adminer_object() {\n\tclass AdminerCds extends Adminer\\Adminer {\n\n\t\tfunction name() {\n\t\t\t// custom name in "
  },
  {
    "path": "editor/include/adminer.inc.php",
    "chars": 21135,
    "preview": "<?php\nnamespace Adminer;\n\nclass Adminer {\n\tstatic $instance;\n\tpublic $error = '';\n\tprivate $values = array();\n\n\tfunction"
  },
  {
    "path": "editor/include/connect.inc.php",
    "chars": 74,
    "preview": "<?php\nnamespace Adminer;\n\nconnection()->select_db(adminer()->database());\n"
  },
  {
    "path": "editor/include/editing.inc.php",
    "chars": 2053,
    "preview": "<?php\nnamespace Adminer;\n\nfunction doc_link(array $paths, string $text = \"\"): string {\n\treturn \"\";\n}\n\n/** Encode e-mail "
  },
  {
    "path": "editor/index.php",
    "chars": 1011,
    "preview": "<?php\n/** Adminer Editor - Compact database editor\n* @link https://www.adminer.org/\n* @author Jakub Vrana, https://www.v"
  },
  {
    "path": "editor/script.inc.php",
    "chars": 814,
    "preview": "<?php\nnamespace Adminer;\n\nif ($_GET[\"script\"] == \"kill\") {\n\tconnection()->query(\"KILL \" . number($_POST[\"kill\"]));\n\n} el"
  },
  {
    "path": "editor/sqlite.php",
    "chars": 693,
    "preview": "<?php\n// see ../plugins/editor-setup.php for an easier solution\n\nfunction adminer_object() {\n\tinclude_once \"../plugins/l"
  },
  {
    "path": "editor/static/editing.js",
    "chars": 1357,
    "preview": "'use strict'; // Editor specific functions\n\nfunction messagesPrint() {\n}\n\nfunction selectFieldChange() {\n}\n\nlet helpOpen"
  },
  {
    "path": "eslint.config.mjs",
    "chars": 715,
    "preview": "// prepend adminer/include/functions.js to adminer/include/editing.js and editor/include/editing.js, then delete\n\nimport"
  },
  {
    "path": "lang.php",
    "chars": 3867,
    "preview": "#!/usr/bin/env php\n<?php\ninclude __DIR__ . \"/adminer/include/errors.inc.php\";\n\nunset($_COOKIE[\"adminer_lang\"]);\n$_SESSIO"
  },
  {
    "path": "phpcs.xml",
    "chars": 6227,
    "preview": "<?xml version=\"1.0\"?>\n<ruleset name=\"Adminer Coding Standard\">\n\t<description>The coding standard for Adminer.</descripti"
  },
  {
    "path": "phpstan.neon",
    "chars": 4208,
    "preview": "parameters:\n\tlevel: 6\n\tcheckNullables: true # level 8\n\n\tignoreErrors:\n\t\t# need to fix\n\t\t- \"~^Function Adminer\\\\\\\\fields_"
  },
  {
    "path": "plugins/README.md",
    "chars": 79,
    "preview": "Plugins directory including external plugins: https://www.adminer.org/plugins/\n"
  },
  {
    "path": "plugins/adminer.js.php",
    "chars": 903,
    "preview": "<?php\n\n/**\n * Enables auto-detection and inclusion of adminer.js, like adminer.css\n *\n * @author Roy Orbitson, https://g"
  },
  {
    "path": "plugins/backward-keys.php",
    "chars": 3993,
    "preview": "<?php\n\n/** Display links to tables referencing current row, same as in Adminer Editor\n* @link https://www.adminer.org/pl"
  },
  {
    "path": "plugins/before-unload.php",
    "chars": 1453,
    "preview": "<?php\n\n/** Display confirmation before unloading page if a form field was changed\n* @link https://www.adminer.org/plugin"
  },
  {
    "path": "plugins/config.php",
    "chars": 4465,
    "preview": "<?php\n\n/** Configure options by end-users and store them to a cookie\n* @link https://www.adminer.org/plugins/#use\n* @aut"
  },
  {
    "path": "plugins/dark-switcher.php",
    "chars": 1733,
    "preview": "<?php\n\n/** Allow switching light and dark mode\n* @link https://www.adminer.org/plugins/#use\n* @author Jakub Vrana, https"
  },
  {
    "path": "plugins/database-hide.php",
    "chars": 1611,
    "preview": "<?php\n\n/** Hide some databases from the interface - just to improve design, not a security plugin\n* @link https://www.ad"
  },
  {
    "path": "plugins/designs.php",
    "chars": 1707,
    "preview": "<?php\n\n/** Allow switching designs\n* @link https://www.adminer.org/plugins/#use\n* @author Jakub Vrana, https://www.vrana"
  },
  {
    "path": "plugins/drivers/README.md",
    "chars": 339,
    "preview": "Using drivers: https://www.adminer.org/plugins/#use\n\nDeveloping drivers: https://www.adminer.org/en/drivers/\n\nThe type d"
  },
  {
    "path": "plugins/drivers/clickhouse.php",
    "chars": 10116,
    "preview": "<?php\nnamespace Adminer;\n\nadd_driver(\"clickhouse\", \"ClickHouse (alpha)\");\n\nif (isset($_GET[\"clickhouse\"])) {\n\tdefine('Ad"
  }
]

// ... and 61 more files (download for full content)

About this extraction

This page contains the full source code of the vrana/adminer GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 261 files (2.1 MB), approximately 571.6k tokens, and a symbol index with 1404 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!