Example #1
0
        private string AddSelectSingerFullNameResult(string fullName, int paramIndex)
        {
            var selectFullNameSql = $"{Environment.NewLine}SELECT FullName{Environment.NewLine}FROM Singers{Environment.NewLine}WHERE  TRUE  AND SingerId = @p{paramIndex}";

            SpannerMock.AddOrUpdateStatementResult(selectFullNameSql, CreateFullNameResultSet(fullName));
            return(selectFullNameSql);
        }
Example #2
0
 private string AddFindSingerResult(string sql)
 {
     SpannerMock.AddOrUpdateStatementResult(sql, StatementResult.CreateResultSet(
                                                new List <Tuple <V1.TypeCode, string> >
     {
         Tuple.Create(V1.TypeCode.Int64, "SingerId"),
         Tuple.Create(V1.TypeCode.Date, "BirthDate"),
         Tuple.Create(V1.TypeCode.String, "FirstName"),
         Tuple.Create(V1.TypeCode.String, "FullName"),
         Tuple.Create(V1.TypeCode.String, "LastName"),
         Tuple.Create(V1.TypeCode.Bytes, "Picture"),
     },
                                                new List <object[]>
     {
         new object[] { 1L, null, "Alice", "Alice Morrison", "Morrison", null },
     }
                                                ));
     return(sql);
 }