我需要创建一个接受字符串并对其进行转义的string方法,以便可以在数据库SQL查询中使用它,例如:
"This is john's dog" ==> "This is john''s dog"
"This is a 'quoted' string" ==> "This is a ''quoted'' string"
我希望我的方法看起来像这样:
string PrepareForSQLCommand(string text)
{
...
我创建了一个Dataflow模板,它允许我将数据从Cloud中的CSV文件导入到BigQuery中。我每天都使用云函数Firebase从这个模板创建工作。这是函数中的代码(删除了一些不相关的部分)。
const filePath = object.name?.replace(".csv", "");
// Exit function if file changes are in temporary or staging folder
if (
filePath?.includes("staging") |