Driver/SpannerDBDriver.cs
/// <summary>
/// Gets all table names in the schema in the catalog specified in the database system connected through the specified connection elements set.
/// </summary>
/// <param name="catalogName">Name of the catalog.</param>
/// <param name="schemaName">Name of the schema.</param>
/// <returns>
/// List of all the table names (not synonyms) in the schema in the catalog specified. By default it returns an empty list.
/// </returns>
Gets all table names in the schema in the catalog specified in the database system connected through the specified connection elements set.
Gets all table names in the schema in the catalog specified in the database system connected through the specified connection elements set .
public override List<DBElementName> GetAllTableNames(string catalogName, string schemaName)
		{
			DbConnection connection = this.CreateConnection();
			return ExecuteWithActiveRecoveryStrategy(() =>
													 {
														 try
														 {
															 this.ParentChildTableRelationships.Clear();
															 connection.Open();
															 var cmd = connection.CreateCommand();
															 cmd.CommandText = "SELECT TABLE_NAME, PARENT_TABLE_NAME, ON_DELETE_ACTION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=''";
															 var adapter = this.CreateDataAdapter(cmd);
															 var results = new DataTable();
															 adapter.Fill(results);
															 var toReturn = new List<DBElementName>();
															 foreach(var row in results.AsEnumerable())
															 {
																 var tableName = row.Value<string>("TABLE_NAME");
																 toReturn.Add(new DBElementName(tableName));
																 if(!row.IsNull("PARENT_TABLE_NAME"))
																 {
																	 this.ParentChildTableRelationships.Add(row.Value<string>("PARENT_TABLE_NAME"), new Pair<string, string>(tableName, row.Value<string>("ON_DELETE_ACTION")));
																 }
															 }
															 return toReturn;
														 }
														 finally
														 {
															 connection.SafeClose(true);
														 }
													 });
		}
public override List < DBElementName > GetAllTableNames ( string catalogName , string schemaName ) { DbConnection connection = this . CreateConnection ( ) ; return ExecuteWithActiveRecoveryStrategy ( ( ) => { try { this . ParentChildTableRelationships . Clear ( ) ; connection . Open ( ) ; var cmd = connection . CreateCommand ( ) ; cmd . CommandText = " " ; var adapter = this . CreateDataAdapter ( cmd ) ; var results = new DataTable ( ) ; adapter . Fill ( results ) ; var toReturn = new List < DBElementName > ( ) ; foreach ( var row in results . AsEnumerable ( ) ) { var tableName = row . Value < string > ( " " ) ; toReturn . Add ( new DBElementName ( tableName ) ) ; if ( ! row . IsNull ( " " ) ) { this . ParentChildTableRelationships . Add ( row . Value < string > ( " " ) , new Pair < string , string > ( tableName , row . Value < string > ( " " ) ) ) ; } } return toReturn ; } finally { connection . SafeClose ( true ) ; } } ) ; }
Gets all table names in the schema in the catalog specified in the database system connected through the specified connection elements set.
Gets all table names in the schema in the catalog specified in the database system connected through the specified connection elements set .
// empty schema as Spanner doesn't have catalogs nor schemas
List of all the table names (not synonyms) in the schema in the catalog specified. By default it returns an empty list.
List of all the table names ( not synonyms ) in the schema in the catalog specified . By default it returns an empty list .
catalogName
string
Name of the catalog.
Name of the catalog .
schemaName
string
Name of the schema.
Name of the schema .