github.com/lulzWill/go-agent@v2.1.2+incompatible/internal/crossagent/cross_agent_tests/sql_obfuscation/README.md (about)

     1  These test cases cover obfuscation (more properly, masking) of literal values
     2  from SQL statements captured by agents. SQL statements may be captured and
     3  attached to transaction trace nodes, or to slow SQL traces.
     4  
     5  `sql_obfuscation.json` contains an array of test cases.  The inputs for each
     6  test case are in the `sql` property of each object. Each test case also has an
     7  `obfuscated` property which is an array containing at least one valid output.
     8  
     9  Test cases also have a `dialects` property, which is an array of strings which
    10  specify which sql dialects the test should apply to. See "SQL Syntax Documentation" list below. This is relevant because for example, PostgreSQL uses
    11  different identifier and string quoting rules than MySQL (most notably,
    12  double-quoted string literals are not allowed in PostgreSQL, where
    13  double-quotes are instead used around identifiers).
    14  
    15  Test cases may also contain the following properties:
    16    * `malformed`: (boolean) tests who's SQL queries are not valid SQL in any
    17    quoting mode. Some agents may choose to attempt to obfuscate these cases,
    18    and others may instead just replace the query entirely with a placeholder
    19    message.
    20    * `pathological`: (boolean) tests which are designed specifically to break
    21    specific methods of obfuscation, or contain patterns that are known to be
    22    difficult to handle correctly
    23    * `comments`: an array of strings that could be usefult for understanding
    24    the test.
    25  
    26  The following database documentation may be helpful in understanding these test
    27  cases:
    28  * [MySQL String Literals](http://dev.mysql.com/doc/refman/5.5/en/string-literals.html)
    29  * [PostgreSQL String Constants](http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS)
    30  
    31  SQL Syntax Documentation:
    32  * [MySQL](http://dev.mysql.com/doc/refman/5.5/en/language-structure.html)
    33  * [PostgreSQL](http://www.postgresql.org/docs/8.4/static/sql-syntax.html)
    34  * [Cassandra](http://docs.datastax.com/en/cql/3.1/cql/cql_reference/cql_lexicon_c.html)
    35  * [Oracle](http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/langelems.htm)
    36  * [SQLite](https://www.sqlite.org/lang.html)