示例#1
0
        /// <summary>
        /// Procedure <paramref name="spName"/>를 수행할 <see cref="SQLiteCommand"/> 를 생성합니다.
        /// </summary>
        /// <param name="db">DAAB의 SQLite 용 Database 인스턴스</param>
        /// <param name="spName">Procedure name</param>
        /// <param name="discoverParams">discover parameters</param>
        /// <returns>생성한 <see cref="SQLiteCommand"/></returns>
        public static SQLiteCommand GetProcedureSqlCommand(this SQLiteDatabase db, string spName, bool discoverParams)
        {
            if (IsDebugEnabled)
            {
                log.Debug("Procedure를 수행할 SQLiteCommand를 생성합니다. spName=[{0}], discoverParams=[{1}]", spName, discoverParams);
            }

            var cmd = db.GetStoredProcCommand(spName);

            if (discoverParams)
            {
                db.DiscoverParameters(cmd);
            }

            return((SQLiteCommand)cmd);
        }