Exemplo n.º 1
0
        public void LastInsertId()
        {
            IFunction func = SqlFn.LastInsertId();

            Exception ex = Assert.Throws <ClauseNotSupportedException>(() => engine.Compile(func));

            Assert.Equal($"Function \"LASTINSERTID\" is not supported in this engine.", ex.Message);
        }
Exemplo n.º 2
0
        public void LastInsertId()
        {
            IFunction func = SqlFn.LastInsertId();

            QueryResult result = engine.Compile(func);

            Assert.Equal("LASTVAL()", result.Sql);
            Assert.Equal(new Dictionary <string, object>(), result.Parameters);
        }