Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

Open PQL is a high-performance Rust implementation of the Poker Query Language (PQL), enabling SQL-like queries for poker analysis and calculations. It is a spiritual successor to the original Java implementation developed by Odds Oracle.

⚠️ Work in Progress: This project is under active development and is not yet ready for production use.

What is PQL?

PQL lets you ask questions about poker situations in a declarative, SQL-like syntax:

select equity
from   hero='AhKh', villain='QQ+', board='Ah9s2c', game='holdem'

This computes hero’s equity against villain’s range on a given flop.

Why Open PQL?

  • Familiar syntax — SQL-like grammar is easy to learn if you know databases.
  • High performance — written in Rust, with Monte Carlo sampling for fast estimates.
  • Multi-game support — Texas Hold’em and other variants.
  • Library + CLI — use the opql command or embed the runner crate in your code.

Workspace Crates

CratePurpose
openpql-preludeCore poker types: cards, hands, evaluators
openpql-coreGame abstraction and query execution core
openpql-range-parserParser for range notation (AA-TT, AwKw+, …)
openpql-pql-parserParser for PQL syntax
openpql-runnerQuery executor and opql CLI
openpql-macroInternal procedural macros

How to Read This Book

Try It Online

An interactive demo is available at https://pql-playground.solve.poker.