Skip to content

wyattbui/type-orm-log-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ› οΈ TypeORM SQL Log Parser

A simple web-based tool that converts raw TypeORM logs into readable SQL queries, supports multiple log lines, highlights SQL syntax, and allows easy copying and saving.

🌟 Features

  • βœ… Parse raw TypeORM logs (query + -- PARAMETERS)
  • 🧠 Auto inject parameters into query placeholders
  • ✨ Beautify SQL for better readability
  • πŸ–οΈ SQL syntax highlighting
  • πŸ“‹ Copy each query result individually
  • πŸ’Ύ Save input/output as JSON
  • βž• Supports multiple queries at once

πŸš€ How to Use

  1. Open index.html in your browser.

  2. Paste one or more TypeORM logs in the input box. Example:

    SELECT * FROM "users" WHERE id = $1 -- PARAMETERS: ["abc-123"]
    SELECT * FROM "orders" WHERE user_id = $1 AND status = $2 -- PARAMETERS: ["abc-123", "pending"]
    
  3. Click Parse.

  4. Each parsed & formatted SQL query will appear in a separate box.

  5. Click the copy icon to copy individual SQL queries.

πŸ—οΈ Example Input

πŸ“¦ Output

SELECT * FROM "users" WHERE id = 'abc-123'


πŸ“Œ Limitations
Only supports -- PARAMETERS: [...] format.

Assumes parameter order matches $1, $2, ... in SQL.

Beautifier is regex-based (not a full SQL parser).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages