All tools › Data as code
SQL IN clause builder
A column of values as a list, quoted where it has to be and cut into batches.
It runs entirely in this browser tab: the documents you paste are never uploaded, and the tool makes no network request while it works. Open your browser's network panel and try it — nothing leaves the page.
Settings
- Database
- Choices: PostgreSQL, MySQL, SQLite, SQL Server.
- Quotation marks
- Quoting nothing loses data; quoting everything is what a strict reader wants. Choices: Work it out, Always, Never.
- Drop repeats
- A list for a query has no reason to name the same value twice.
- Values in a batch
- Every database has a limit; past it the query is refused rather than slow. A number from 0 to 10000.
- Column name
- The name the list is written against in the query.
How to use it
- Paste your text into the box above, or open a file.
- Adjust the settings beside it until the result is what you wanted.
- Copy the result, or save it as a file. The result updates as you type.
Questions
- Is what I paste uploaded anywhere?
- No. The whole tool is carried as WebAssembly and runs on your own device. That is the point of the group: the files these tools are for are exactly the ones you would not paste into somebody else's server.
- How big a file can it take?
- About a megabyte, and it says so rather than truncating quietly. Past that you are handing it a database rather than a document, and the input here is a text area — the editing view is capped at forty thousand characters and says so, though the tool still reads all of what you gave it.
- Why does it say it guessed?
- Because it did. Which format a document is, which delimiter a table uses and whether the first row is a header are all decided by looking at the text. Each guess is right almost always and each is printed on the result, because a converter that guessed silently and got it wrong would eat a file.
- Does it change my numbers?
- No. A number keeps the text it was written as, all the way through: `1.0` stays `1.0` and a thirty-digit identifier stays thirty digits. Nothing here is ever a floating-point value, which is why a sorted document differs from the original only where you asked it to.
Other tools for data as code
JSON to TypeScript
Interfaces worked out from example documents, optional fields marked.
JSON to Rust
Structures with serialisation attributes and the renames a Rust name needs.
JSON to Go
Structures with serialisation tags and exported field names.
Data to SQL schema
A CREATE TABLE worked out from the values, with the key candidates named.
SQL insert generator
Statements from a table, values escaped the way each dialect wants.
Diagram from a schema
Reads CREATE TABLE statements and draws the relationships between them.
All thirty-five tools