aaronidas/apm-sql-lexer

SQL Lexer for APM in PHP

v0.0.2 2020-06-14 09:15 UTC

This package is auto-updated.

Last update: 2024-12-14 20:27:05 UTC


README

Simple and lightweight parser for span names in APM transactions written in PHP.

Installation

Install via [composer]

composer require aaronidas/apm-sql-lexer

How to use

Signature::parse($query);

Example:

$spanName = Signature::parse('SELECT * FROM foo');
var_dump($spanName);
// output: SELECT FROM foo
Reference doc for development:

Reference doc

  • PostgreSQL dollar quoting not implemented yet