示例#1
0
        /// <summary>
        /// Creates a key consisting of the given key parts.
        /// </summary>
        /// <param name="keyParts">The values that define the key</param>
        public Key(params object[] keyParts)
        {
            var protobufValues = keyParts.Select(
                v => SpannerDbType.FromClrType(v?.GetType())?.ToProtobufValue(v, SpannerConversionOptions.Default) ?? Value.ForNull());

            KeyParts = new ListValue {
                Values = { protobufValues }
            };
        }