git.iko.soy/parseable-android
on icon help sign in
7 lines 341 B history raw
1package com.parseable.android.data
3/** Escape single quotes in user input to prevent SQL injection in string literals. */
4fun escapeSql(value: String): String = value.replace("'", "''")
6/** Escape a SQL identifier (table/column name) for use inside double quotes. */
7fun escapeIdentifier(name: String): String = name.replace("\"", "\"\"")