Unit 'DB' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

SkipComments

Skip SQL comments.

Declaration

Source position: db.pas line 2520

function SkipComments(

  var p: PChar;

  EscapeSlash: Boolean;

  EscapeRepeat: Boolean

):Boolean;

Arguments

p

  

Pointer to null-terminated string containing a SQL statement.

EscapeSlash

  

Is a backslash an escape character.

EscapeRepeat

  

Are repeated quotes considered a single character.

Function result

True if a comment was skipped.

Description

SkipComments examines the null-terminated string in P and skips any SQL comment or string literal found at the start. It returns P the first non-comment or non-string literal position. The EscapeSlash parameter determines whether the backslash character (\) functions as an escape character (i.e. the following character is not considered a delimiter). EscapeRepeat must be set to True if the quote character is repeated to indicate itself.

The function returns True if a comment was found and skipped, False otherwise.

Errors

No checks are done on the validity of P.

See also

TParams.ParseSQL

  

Parse SQL statement, replacing parameter names with SQL parameter placeholders.


Documentation generated on: Nov 22 2024