|
| 1 | +<!DOCTYPE html> |
| 2 | +<html class="theme-auto" lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8" /> |
| 5 | + <meta |
| 6 | + content="width=device-width, initial-scale=1" |
| 7 | + name="viewport" |
| 8 | + /> |
| 9 | + <title>Inquire Documentation</title> |
| 10 | + <meta content="Inquire is a lightweight TypeScript SQL builder. It helps you define schemas, build SQL queries, and execute them through a connection wrapper. It does not model records, relationships, or unit-of-work behavior for you." name="description" /> |
| 11 | + <link href="https://stackpress.github.io/inquire/" rel="canonical" /> |
| 12 | + <meta content="Inquire Documentation" property="og:title" /> |
| 13 | + <meta content="Inquire is a lightweight TypeScript SQL builder. It helps you define schemas, build SQL queries, and execute them through a connection wrapper. It does not model records, relationships, or unit-of-work behavior for you." property="og:description" /> |
| 14 | + <meta content="website" property="og:type" /> |
| 15 | + <meta content="https://stackpress.github.io/inquire/" property="og:url" /> |
| 16 | + <meta content="https://stackpress.github.io/inquire/assets/logo.png" property="og:image" /> |
| 17 | + <meta content="Inquire Documentation" property="og:site_name" /> |
| 18 | + <meta content="summary" name="twitter:card" /> |
| 19 | + <meta content="Inquire Documentation" name="twitter:title" /> |
| 20 | + <meta content="Inquire is a lightweight TypeScript SQL builder. It helps you define schemas, build SQL queries, and execute them through a connection wrapper. It does not model records, relationships, or unit-of-work behavior for you." name="twitter:description" /> |
| 21 | + <meta content="https://stackpress.github.io/inquire/assets/logo.png" name="twitter:image" /> |
| 22 | + <link href="./assets/favicon.ico" rel="icon" /> |
| 23 | + <link href="./assets/site.css" rel="stylesheet" /> |
| 24 | + </head> |
| 25 | + <body class="page-home"> |
| 26 | + <div class="page-home-shell"> |
| 27 | + <header class="page-home-header"> |
| 28 | + <a class="brandmark" href="./index.html" title="Inquire home"> |
| 29 | + <img |
| 30 | + alt="Inquire logo" |
| 31 | + height="72" |
| 32 | + src="./assets/logo.png" |
| 33 | + width="72" |
| 34 | + /> |
| 35 | + <span class="brandmark-copy"> |
| 36 | + <h1>Inquire</h1> |
| 37 | + <span>TypeScript SQL builder</span> |
| 38 | + </span> |
| 39 | + </a> |
| 40 | + <div class="page-home-header-actions"> |
| 41 | + <a |
| 42 | + class="page-home-link" |
| 43 | + href="./tutorials/quick-start/index.html" |
| 44 | + title="Start with the quick start" |
| 45 | + > |
| 46 | + Quick Start |
| 47 | + </a> |
| 48 | + <button |
| 49 | + aria-label="Toggle theme" |
| 50 | + class="theme-toggle" |
| 51 | + data-theme-toggle="true" |
| 52 | + type="button" |
| 53 | + > |
| 54 | + <span>Light / Dark</span> |
| 55 | + </button> |
| 56 | + </div> |
| 57 | + </header> |
| 58 | + |
| 59 | + <main class="page-home-main"> |
| 60 | + <section class="page-home-hero"> |
| 61 | + <div class="page-home-hero-copy"> |
| 62 | + <p class="page-home-eyebrow"> |
| 63 | + Query Builder. Schema Builder. No ORM. |
| 64 | + </p> |
| 65 | + <p class="page-home-hero-lede"> |
| 66 | + Inquire is a lightweight TypeScript SQL builder for schema work, |
| 67 | + typed queries, and multi-dialect execution. It stays close to SQL |
| 68 | + so you can evaluate it quickly and keep control. |
| 69 | + </p> |
| 70 | + <div class="page-home-hero-actions"> |
| 71 | + <a |
| 72 | + class="page-home-button page-home-button-primary" |
| 73 | + href="./tutorials/quick-start/index.html" |
| 74 | + title="Open the quick start" |
| 75 | + > |
| 76 | + Try the Quick Start |
| 77 | + </a> |
| 78 | + <a |
| 79 | + class="page-home-button page-home-button-secondary" |
| 80 | + href="./api/index.html" |
| 81 | + title="Browse the API reference" |
| 82 | + > |
| 83 | + Learn More |
| 84 | + </a> |
| 85 | + </div> |
| 86 | + <div class="page-home-surface-list"> |
| 87 | + <span class="page-home-surface-pill">Engine</span><span class="page-home-surface-pill">Create / Alter</span><span class="page-home-surface-pill">Select / Insert / Update / Delete</span><span class="page-home-surface-pill">Mysql / Pgsql / Sqlite</span><span class="page-home-surface-pill">Connection wrappers</span> |
| 88 | + </div> |
| 89 | + </div> |
| 90 | + <div class="page-home-hero-example"> |
| 91 | + |
| 92 | + <div class="code-shell"> |
| 93 | + <div class="code-toolbar"> |
| 94 | + <span class="code-language">ts</span> |
| 95 | + <button class="copy-button" type="button"> |
| 96 | + Copy example |
| 97 | + </button> |
| 98 | + </div> |
| 99 | + <pre class="code-block" data-language="ts"><code class="language-ts"><span class="token token-keyword">const</span> engine = connect<span class="token token-operator">(</span>resource<span class="token token-operator">)</span><span class="token token-operator">;</span> |
| 100 | + |
| 101 | +<span class="token token-keyword">await</span> engine<span class="token token-operator">.</span>create<span class="token token-operator">(</span><span class="token token-string">'users'</span><span class="token token-operator">)</span> |
| 102 | + <span class="token token-operator">.</span>addField<span class="token token-operator">(</span><span class="token token-string">'id'</span><span class="token token-operator">,</span> <span class="token token-operator">{</span> <span class="token token-keyword">type</span><span class="token token-operator">:</span> <span class="token token-string">'integer'</span><span class="token token-operator">,</span> autoIncrement<span class="token token-operator">:</span> <span class="token token-keyword">true</span> <span class="token token-operator">}</span><span class="token token-operator">)</span> |
| 103 | + <span class="token token-operator">.</span>addField<span class="token token-operator">(</span><span class="token token-string">'email'</span><span class="token token-operator">,</span> <span class="token token-operator">{</span> <span class="token token-keyword">type</span><span class="token token-operator">:</span> <span class="token token-string">'string'</span><span class="token token-operator">,</span> length<span class="token token-operator">:</span> <span class="token token-number">255</span><span class="token token-operator">,</span> nullable<span class="token token-operator">:</span> <span class="token token-keyword">false</span> <span class="token token-operator">}</span><span class="token token-operator">)</span> |
| 104 | + <span class="token token-operator">.</span>addPrimaryKey<span class="token token-operator">(</span><span class="token token-string">'id'</span><span class="token token-operator">)</span><span class="token token-operator">;</span> |
| 105 | + |
| 106 | +<span class="token token-keyword">const</span> users = <span class="token token-keyword">await</span> engine |
| 107 | + <span class="token token-operator">.</span>select<span class="token token-operator"><</span><span class="token token-operator">{</span> id<span class="token token-operator">:</span> number<span class="token token-operator">;</span> email<span class="token token-operator">:</span> string <span class="token token-operator">}</span><span class="token token-operator">></span><span class="token token-operator">(</span><span class="token token-operator">[</span><span class="token token-string">'id'</span><span class="token token-operator">,</span> <span class="token token-string">'email'</span><span class="token token-operator">]</span><span class="token token-operator">)</span> |
| 108 | + <span class="token token-operator">.</span><span class="token token-keyword">from</span><span class="token token-operator">(</span><span class="token token-string">'users'</span><span class="token token-operator">)</span><span class="token token-operator">;</span></code></pre> |
| 109 | + </div> |
| 110 | + |
| 111 | + </div> |
| 112 | + </section> |
| 113 | + |
| 114 | + <section class="page-home-fit-grid"> |
| 115 | + <article class="page-home-fit-card"> |
| 116 | + <p class="page-home-fit-card-eyebrow">Good fit</p> |
| 117 | + <h2>Use Inquire when you want</h2> |
| 118 | + <ul class="page-home-fit-list"> |
| 119 | + <li>Simply schema and query building</li><li>Same DX across MySQL, Postgred, and SQLite</li><li>Easy connection interface for database libraries</li><li>Building your own ORM, migration tools and generators</li> |
| 120 | + </ul> |
| 121 | + </article> |
| 122 | + <article class="page-home-fit-card page-home-fit-card-quiet"> |
| 123 | + <p class="page-home-fit-card-eyebrow">Not trying to be</p> |
| 124 | + <h2>Choose something else if you need</h2> |
| 125 | + <ul class="page-home-fit-list"> |
| 126 | + <li>An object relational mapper and strong type mapping</li><li>Automatic boilerplate CRUD operations</li><li>Deterministic relationship management</li><li>Expressive code patterns over performance</li> |
| 127 | + </ul> |
| 128 | + </article> |
| 129 | + </section> |
| 130 | + |
| 131 | + <section class="page-home-next"> |
| 132 | + <div class="page-home-next-header"> |
| 133 | + <p class="page-home-eyebrow">Start evaluating</p> |
| 134 | + <h2>Pick the next page based on how you work</h2> |
| 135 | + </div> |
| 136 | + <div class="page-home-next-grid"> |
| 137 | + <a |
| 138 | + class="page-home-next-card" |
| 139 | + href="./tutorials/quick-start/index.html" |
| 140 | + title="Quick Start" |
| 141 | + > |
| 142 | + <span class="page-home-next-label">Start here</span> |
| 143 | + <strong>Quick Start</strong> |
| 144 | + <span>Build a table, insert rows, and run a typed query in one pass.</span> |
| 145 | + </a><a |
| 146 | + class="page-home-next-card" |
| 147 | + href="./explanation/mental-model/index.html" |
| 148 | + title="Mental Model" |
| 149 | + > |
| 150 | + <span class="page-home-next-label">Understand the shape</span> |
| 151 | + <strong>Mental Model</strong> |
| 152 | + <span>See how engines, builders, dialects, and connections fit together.</span> |
| 153 | + </a><a |
| 154 | + class="page-home-next-card" |
| 155 | + href="./api/index.html" |
| 156 | + title="API Reference" |
| 157 | + > |
| 158 | + <span class="page-home-next-label">Reference lookup</span> |
| 159 | + <strong>API Reference</strong> |
| 160 | + <span>Inspect the exact class and method surface when you need details.</span> |
| 161 | + </a> |
| 162 | + </div> |
| 163 | + </section> |
| 164 | + </main> |
| 165 | + |
| 166 | + <script defer src="./assets/site.js"></script> |
| 167 | + </div> |
| 168 | + </body> |
| 169 | +</html> |
0 commit comments