Exemplo n.º 1
0
        protected override SqlExpression GetInsertIdentityExpression(MetaDataMember member)
        {
            var exp = new SqlVariable(member.Type, typeProvider.From(member.Type),
                                      "NEXTVAL FOR " + DB2Builder.GetSequenceName(member, translator.Provider.SqlIdentifier), dominatingExpression);

            return(exp);
        }
Exemplo n.º 2
0
        protected override SqlExpression GetReturnIdentityExpression(MetaDataMember idMember, bool isOutputFromInsert)
        {
            var name = "PREVVAL FOR " + DB2Builder.GetSequenceName(idMember, translator.Provider.SqlIdentifier) + " FROM " + idMember.DeclaringType.Table.TableName;//OracleSqlBuilder.GetSequenceName(idMember, translator.Provider.SqlIdentifier) + ".CURRVAL";

            return(new SqlVariable(idMember.Type, typeProvider.From(idMember.Type), name, this.dominatingExpression));
        }