コード例 #1
0
ファイル: SqlServerDialect.cs プロジェクト: fossabot/HQ.Lingo
        public override bool TryFetchInsertedKey(FetchInsertedKeyLocation location, out string sql)
        {
            switch (location)
            {
            case FetchInsertedKeyLocation.BeforeValues:
                sql = "OUTPUT Inserted.Id";
                return(true);

            default:
                sql = null;
                return(false);
            }
        }
コード例 #2
0
        public override bool TryFetchInsertedKey(FetchInsertedKeyLocation location, out string sql)
        {
            switch (location)
            {
            case FetchInsertedKeyLocation.AfterStatement:
                sql = "SELECT LAST_INSERT_ROWID() AS \"Id\"";
                return(true);

            default:
                sql = null;
                return(false);
            }
        }
コード例 #3
0
        public bool TryFetchInsertedKey(FetchInsertedKeyLocation location, out string sql)
        {
            switch (location)
            {
            case FetchInsertedKeyLocation.AfterStatement:
                sql = $"SELECT LAST_INSERT_ROWID() AS {Quote}Id{Quote}";
                return(true);

            case FetchInsertedKeyLocation.BeforeValues:
                sql = null;
                return(false);

            default:
                sql = null;
                return(false);
            }
        }
コード例 #4
0
ファイル: SqlDialect.cs プロジェクト: fossabot/HQ.Lingo
 public abstract bool TryFetchInsertedKey(FetchInsertedKeyLocation location, out string sql);
コード例 #5
0
 public bool TryFetchInsertedKey(FetchInsertedKeyLocation location, out string sql)
 {
     sql = null;
     return(false);
 }
コード例 #6
0
 public bool TryFetchInsertedKey(FetchInsertedKeyLocation location, out string sql)
 {
     throw new NotImplementedException();
 }