Exemplo n.º 1
0
 public void NVarCharMaxReturnsExpectedInstance()
 {
     Assert.That(TSql.NVarCharMax("value"), Is.EqualTo(new TSqlNVarCharValue("value", TSqlNVarCharSize.Max)));
 }
Exemplo n.º 2
0
 public void NVarCharMaxNullReturnsExpectedInstance()
 {
     Assert.That(TSql.NVarCharMax(null), Is.EqualTo(new TSqlNVarCharNullValue(TSqlNVarCharSize.Max)));
 }
        public string GetCheckpoint()
        {
            const string sql = @"SELECT [CheckpointToken] FROM [StoreCheckpoint] WHERE [StoreId] = @P1";

            using (var reader = _executer.ExecuteReader(TSql.QueryStatement(sql, new { P1 = TSql.NVarCharMax(_tenantId) })))
            {
                if (reader.IsClosed)
                {
                    return(null);
                }
                return(reader.Read() ? reader.GetString(0) : null);
            }
        }