Member Junction
    Preparing search index...

    Interface SQLScreeningScan

    interface SQLScreeningScan {
        Classified: boolean;
        Code: string;
        CodeWithIdentifiers: string;
        CommentCount: number;
        Dialect: SQLScreeningDialect;
        Error: string | null;
        LeadingWord: string | null;
        Spans: SQLScreeningSpan[];
        Tokens: SQLScreeningToken[];
    }
    Index

    Properties

    Classified: boolean

    True when every character was read the way the database reads it. When false, reject the text.

    Code: string

    The input with each string literal, quoted identifier and comment replaced by one space, and a space between a number and a word written against it. Only code remains, split where the database splits it, so N'x'UNION reads as UNION and 1UNION as 1 UNION. Keyword, statement-separator and comment-marker checks read this. When Classified is false, the text from the point where the scan stopped is left as written.

    CodeWithIdentifiers: string

    Code, except each quoted identifier is written as its bare name between spaces, so [sys].[objects] reads as sys . objects. Checks for object and function names read this, so quoting a name does not hide it.

    CommentCount: number

    Number of comments found.

    The dialect whose rules were applied.

    Error: string | null

    Why the text could not be classified; null when Classified is true.

    LeadingWord: string | null

    The first token that is not whitespace or a comment, when that token is an unquoted word and the character after it is ASCII, so every server ends the word in the same place. Null when a literal, quoted identifier, number or symbol comes first, or there is no token. Checks for the statement's opening keyword read this.

    The string literals, quoted identifiers and comments found, in order.

    Every token in order: unquoted words, quoted identifiers, numbers, string literals and single-character symbols. When Classified is false, the list stops where the scan stopped.