async function safeRows(table, rows) {
  const existingFields = (
    await saltcorn.data.db.query(
      `PRAGMA table_info('${saltcorn.data.db.sqlsanitize(table)}')`
    )
  ).rows.map((row) => row.name);
  return rows.map((row) => {
    const insertRow = {};
    for (const safeField of existingFields) {
      const fromRow = row[safeField];
      if (fromRow !== null && fromRow !== undefined) {
        insertRow[safeField] = fromRow;
      }
    }
    return insertRow;
  });
}
pick fields that really exist
@param {*} table
@param {*} rows
@returns