Driver/SpannerDBDriver.cs
/// <summary>
/// Converts the name specified to a DBType value.
/// </summary>
/// <param name="dbTypeName">Name of the db type.</param>
/// <returns>
/// the DBType value corresponding to the dbtype name specified
/// </returns>
Converts the name specified to a DBType value.
Converts the name specified to a DBType value .
public override int ConvertStringToDBType(string dbTypeName)
		{
			int toReturn;
			switch(dbTypeName.ToLowerInvariant())
			{
				case "bool":
					toReturn = (int)SpannerDbTypes.Bool;
					break;
				case "bytes":
					toReturn = (int)SpannerDbTypes.Bytes;
					break;
				case "date":
					toReturn = (int)SpannerDbTypes.Date;
					break;
				case "float64":
					toReturn = (int)SpannerDbTypes.Float64;
					break;
				case "int64":
					toReturn = (int)SpannerDbTypes.Int64;
					break;
				case "string":
					toReturn = (int)SpannerDbTypes.String;
					break;
				case "timestamp":
					toReturn = (int)SpannerDbTypes.Timestamp;
					break;
				default:
					toReturn = (int)SpannerDbTypes.String;
					break;
			}
			return toReturn;
		}
public override int ConvertStringToDBType ( string dbTypeName ) { int toReturn ; switch ( dbTypeName . ToLowerInvariant ( ) ) { case " " : toReturn = ( int ) SpannerDbTypes . Bool ; break ; case " " : toReturn = ( int ) SpannerDbTypes . Bytes ; break ; case " " : toReturn = ( int ) SpannerDbTypes . Date ; break ; case " " : toReturn = ( int ) SpannerDbTypes . Float64 ; break ; case " " : toReturn = ( int ) SpannerDbTypes . Int64 ; break ; case " " : toReturn = ( int ) SpannerDbTypes . String ; break ; case " " : toReturn = ( int ) SpannerDbTypes . Timestamp ; break ; default : toReturn = ( int ) SpannerDbTypes . String ; break ; } return toReturn ; }
Converts the name specified to a DBType value.
Converts the name specified to a DBType value .
the DBType value corresponding to the dbtype name specified
the DBType value corresponding to the dbtype name specified
dbTypeName
string
Name of the db type.
Name of the db type .