{"repo":"kaspermarstal/plprql","free":true,"listed":false,"github":"https://github.com/kaspermarstal/plprql","clone":"git clone https://github.com/kaspermarstal/plprql.git","description":"Use PRQL in PostgreSQL","language":"Rust","stars":475,"topics":["pgrx","postgresql","prql","sql","extension"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"PRQL in PostgreSQL! PL/PRQL is a PostgreSQL extension that lets you write stored procedures with PRQL. The extension supports PostgreSQL v13-18 on Linux and macOS. What is PRQL? PRQL (Pipelined Relational Query Language) is an open source query language for data manipulation and analysis that compiles to SQL. PRQL introduces a pipeline concept similar to Unix pipes that transforms data line-by-line. The sequential series of transformations reduces the complexity often encountered with nested SQL queries and makes your data manipulation logic easier to read and write. With PL/PRQL you can write Procedural Language (PL) functions with PRQL instead of the traditional PL/pgSQL, combining the simplicity of PRQL with the power of stored procedures. Key features - Write functions with PRQL - Useful for large analytical queries - Compile PRQL queries to SQL queries - Useful for development and debugging - Execute PRQL queries - Useful for prototyping and custom queries in ORMs Write functions with PRQL PRQL shines when your SQL queries becomes long and complex. You can manage this complexity by porting your most impressive SQL incantations to PRQL functions, which can then be used in dashboards, business logic or other database code. For example: Compile PRQL queries to SQL queries You can use prql to sql() to see the SQL statements that PostgreSQL executes under the hood. This function invokes the PRQL compiler and shows you the resulting SQL code. Using the example above: Execute P","default_branch":null,"files":null,"tree":[],"storefront":"/r/kaspermarstal","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kaspermarstal/plprql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}