如何预览长字符串(SQL 查询),例如(Eclipse Juno 中 Android 开发的实际代码):
String insert_reminder = "INSERT INTO REMINDERS (NAME, DESCRIPTION, REMIND_TIMESTAMP, REMIND_TYPE_ID, STATE, STATUS_ID, IMAGE_ID, REMIND_RINGTONE) "
+ "VALUES (\'"
+ data.getStringExtra("remind_name")
+ "\',\'"
+ data.getStringExtra("remind_description")
+ "\', "
+ data.getLongExtra("remind_timestamp", 0)
+ ", 1, "
+ data.getIntExtra("remind_state", 1)
+ ", 1,"
+ data.getIntExtra("image_id", 1)
+ ",\'"
+ data.getStringExtra("remind_ringtone") + "\'" +
")";
我想查看完整的字符串,即使没有数据。例如上面:
"INSERT INTO REMINDERS (NAME, DESCRIPTION, REMIND_TIMESTAMP, REMIND_TYPE_ID, STATE, STATUS_ID, IMAGE_ID, REMIND_RINGTONE) VALUES ('data.getStringExtra("remind_name")', 'data.getStringExtra("remind_description")', data.getLongExtra("remind_timestamp", 0), 1, data.getIntExtra("remind_state", 1), 1, data.getIntExtra("image_id", 1), 'data.getStringExtra("remind_ringtone")')"
我需要这个来检查 SQL 查询中的逗号。提前致谢。