Viewing the Raw SQL Statement(xcode で)

Thanks to Core Data. Even without learning SQL and database, you’re able to perform create, select, update and delete operation. However, for those with database background, you may want to know the exact SQLs executed behind the scene.

To enable SQL output for debugging purpose, click “MyStore” and select “Edit Scheme”.

Edit scheme in Xcode project

Under “Argument Passed on Launch” section, click the “+” button and add the “-com.apple.CoreData.SQLDebug 1″ parameter:

Add SQL Debug Parameter

Click “OK” to confirm. Now run your app again and you’ll see the raw SQL statement (e.g. SELECT and UPDATE) displayed in the output window.

SQL statement for Core Data Debugging

时间: 2024-10-11 01:39:32

Viewing the Raw SQL Statement(xcode で)的相关文章

EntityFramework Core Raw SQL

EntityFramework Core Raw SQL 基础查询(执行SQL和存储过程) 啥也不说了,拿起键盘就是干,如下:     public class HomeController : Controller     {        private IBlogRepository _blogRepository;        public HomeController(IBlogRepository blogRepository)         {             _blo

了解entity framework其他query方式之Entity SQL,Raw Sql分析

一:linq 对ef来说不是唯一性的query... 二:Entity Sql 1. esql => entity sql... [类sql的语言] 和sql差不多,但是呢,不是sql... using (SchoolDBEntities db = new SchoolDBEntities()) { //Querying with Object Services and Entity SQL string sqlString = "select Value s from SchoolDBE

Error 1313: RETURN is only allowed in a FUNCTION SQL Statement

1.错误描述 14:07:26 Apply changes to rand_string Error 1313: RETURN is only allowed in a FUNCTION SQL Statement: CREATE PROCEDURE `rand_string` (n int) BEGIN DECLARE chars varchar(100) DEFAULT 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; DECLA

ORA-01555 caused by SQL statement below

Sun Jul 27 15:59:34 2014ORA-01555 caused by SQL statement below (SQL ID: 6cttns598np15, Query Duration=1699 sec, SCN: 0x0001.086b282b):INSERT INTO RP_RETAIL001 (ID, AD_CLIENT_ID, AD_ORG_ID, OWNERID, ISACTIVE, BILLDATE, DOCNO, RETAILBILLTYPE, CREATER,

如何使用SQLAlchemy库写出防SQL注入的Raw SQL

Python阵营有很多操作数据库的开源库(安装pip后,可以借助"pip search mysql"查看可用的库列表),其中被使用最多的无疑是MySQLdb,这个库简单易上手.其偏底层的特性为开发者提供灵活性的同时,也对不少新手写出的DB操作代码提出了考验,因为它只支持raw sql,容易导致sql注入攻击. 鉴于此,很多库提供了ORM接口能力,借助OO思想,数据库中的表被映射为Python的类,类的对象代表数据表中的一行记录,所有的DB操作都通过对象方法调用来实现,这些调用在底层被自

解决mysql的错误 CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1300 Invalid utf8 character string: '\xBF\xA5'

报错: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1300 Invalid utf8 character string: '\xBF\xA5' 解决方法: $currentPrice = $currentPrice * 1; => $currentPrice 原本是字符串的 数字,导致插入数据库失败. =>所以只要改成 数字 即可. =>字符串的 数字 ,乘以 1 就会变

Entity Framework Tutorial Basics(39):Raw SQL Query

Execute Native SQL Query You can execute native raw SQL query against the database using DBContext. You can execute the following types of queries: SQL query for entity types which returns particular types of entities SQL query for non-entity types w

java.sql.preparedstatement和java.sql.statement的区别

本文转自CSDN,然后整理了一遍.原文出处:CSDN JDBC(java database connectivity,java数据库连接)的api中的主要的四个类之一的java.sql.statement要求开发者付出大量的时间和精力.在使用statement获取JDBC访问时所具有的一个共通的问题是输入适当格式的日期和时间戳:2002-02-0520:56 或者 02/05/02 8:56 pm. 通过使用java.sql.preparedstatement,这个问题可以自动解决.一个prep

EF: Raw SQL Queries

Raw SQL Queries Entity Framework allows you to query using LINQ with your entity classes. However, there may be times that you want to run queries using raw SQL directly against the database. This includes calling stored procedures, which can be help