no versions found for ApplicationFrameworkReferences / Utility/Database/MySQLConnector/mysqlconnector_asstring / en

MySQLConnector: asString()

文字列をデータベースで使用する文字列リテラルに変換します。

構文

mysqlConnector.asString(rawString) => string

引数

  • rawString: string

    データベースで使う文字列リテラルに変換する文字列です。

返値: string

データベースで使う文字列リテラルです。

解説

文字列をデータベースで使用する文字列リテラルに変換します。

結果はコンストラクタ の引数 useAnsiQuotes の値に依存します。 useAnsiQuotestrue を指定した場合、文字列リテラルは単引用符(')で囲まれます。 false の場合、代わりに二重引用符(")で囲まれます。