Example #1
0
        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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #4
0
 public abstract bool TryFetchInsertedKey(FetchInsertedKeyLocation location, out string sql);
Example #5
0
 public bool TryFetchInsertedKey(FetchInsertedKeyLocation location, out string sql)
 {
     sql = null;
     return(false);
 }
Example #6
0
 public bool TryFetchInsertedKey(FetchInsertedKeyLocation location, out string sql)
 {
     throw new NotImplementedException();
 }