--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: chess excerpt: | DuckDB Community Extensions A DuckDB extension for parsing and analyzing chess games in PGN format. extension: name: chess description: A DuckDB extension for parsing and analyzing chess games in PGN format. version: 0.6.2 language: Rust build: cmake license: MIT requires_toolchains: "rust" excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads;linux_amd64_musl" maintainers: - dotneB repo: github: dotneB/duckdb-chess ref: v0.6.2 docs: hello_world: | -- Read a pgn file SELECT Event, White, Black, Result, Termination, TimeControl FROM read_pgn('test/pgn_files/sample.pgn'); -- Read multiple pgn files SELECT COUNT(*) FROM read_pgn('test/pgn_files/*.pgn'); -- Read zstd-compressed pgn files SELECT COUNT(*) FROM read_pgn('test/pgn_files/sample.pgn.zst', compression := 'zstd'); -- How many games started with 1. e4 e5 SELECT COUNT_IF(chess_moves_subset('1. e4 e5', movetext)) FROM read_pgn('test/pgn_files/sample.pgn'); -- Removes comments/variations/NAGs and normalizes move numbers SELECT chess_moves_normalize(movetext) FROM read_pgn('test/pgn_files/sample.pgn'); -- Zobrist hash of the final mainline position SELECT chess_moves_hash('1. e4 e5 2. Nf3 Nc6') AS hash; -- Ply count SELECT chess_ply_count('1. e4 e5 2. Nf3') AS ply; -- Normalize Time control notation SELECT chess_timecontrol_normalize('90min./40 + 30min. + 30s./move'); -- 40/5400+30:1800+30 -- Converts FEN to EPD SELECT chess_fen_epd('rnbq1rk1/1pp1bppp/p3pn2/8/2pP4/2N2NP1/PP2PPBP/R1BQ1RK1 w - - 0 8') AS epd; -- Get the first 40 moves of a game as ply, san and epd WITH g AS ( SELECT movetext FROM read_pgn('test/pgn_files/sample.pgn') WHERE parse_error IS NULL LIMIT 1 ) SELECT json_extract(m.value, '$.ply')::INT AS ply, json_extract_string(m.value, '$.move') AS san, json_extract_string(m.value, '$.epd') AS epd FROM g, json_each(CAST(chess_moves_json(g.movetext, 40) AS JSON)) m; extension_star_count: 3 extension_star_count_pretty: 3 extension_download_count: 647 extension_download_count_pretty: 647 image: '/images/community_extensions/social_preview/preview_community_extension_chess.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ✅ | ❌ | ❌ | ❌ | ❌ | | Linux ARM64 | ✅ | ❌ | ❌ | ❌ | ❌ | | macOS AMD64 | ✅ | ❌ | ❌ | ❌ | ❌ | | macOS ARM64 | ✅ | ❌ | ❌ | ❌ | ❌ | | Windows AMD64 | ✅ | ❌ | ❌ | ❌ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions
| function_name | function_type | description | comment | examples | |-----------------------------|---------------|-------------|---------|----------| | chess_fen_epd | scalar | NULL | NULL | | | chess_moves_hash | scalar | NULL | NULL | | | chess_moves_json | macro | NULL | NULL | | | chess_moves_json_impl | scalar | NULL | NULL | | | chess_moves_normalize | scalar | NULL | NULL | | | chess_moves_subset | scalar | NULL | NULL | | | chess_ply_count | macro | NULL | NULL | | | chess_ply_count_impl | scalar | NULL | NULL | | | chess_timecontrol_category | scalar | NULL | NULL | | | chess_timecontrol_json | scalar | NULL | NULL | | | chess_timecontrol_normalize | scalar | NULL | NULL | | | read_pgn | table | NULL | NULL | | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
This extension does not add any settings.