[pgsqlclient-checkins] SF.net SVN: pgsqlclient: [45] trunk/pgsqlclient/source/PostgreSql/Data/Schema
Status: Inactive
Brought to you by:
carlosga_fb
From: <car...@us...> - 2006-03-22 12:11:20
|
Revision: 45 Author: carlosga_fb Date: 2006-03-22 04:10:58 -0800 (Wed, 22 Mar 2006) ViewCVS: http://svn.sourceforge.net/pgsqlclient/?rev=45&view=rev Log Message: ----------- More changes and bugfixes in teh database schema support Modified Paths: -------------- trunk/pgsqlclient/source/PostgreSql/Data/Schema/MetaData.xml trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgColumns.cs trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgSchemaFactory.cs Added Paths: ----------- trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgForeignKeyColumns.cs trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgForeignKeys.cs trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgViewColumns.cs Modified: trunk/pgsqlclient/source/PostgreSql/Data/Schema/MetaData.xml =================================================================== --- trunk/pgsqlclient/source/PostgreSql/Data/Schema/MetaData.xml 2006-03-22 12:09:12 UTC (rev 44) +++ trunk/pgsqlclient/source/PostgreSql/Data/Schema/MetaData.xml 2006-03-22 12:10:58 UTC (rev 45) @@ -157,7 +157,7 @@ </MetaDataCollections> <MetaDataCollections> <CollectionName>Functions</CollectionName> - <NumberOfRestrictions>0</NumberOfRestrictions> + <NumberOfRestrictions>3</NumberOfRestrictions> <NumberOfIdentifierParts>0</NumberOfIdentifierParts> <PopulationMechanism>PrepareCollection</PopulationMechanism> </MetaDataCollections> @@ -189,7 +189,7 @@ </MetaDataCollections> <MetaDataCollections> <CollectionName>PrimaryKeys</CollectionName> - <NumberOfRestrictions>3</NumberOfRestrictions> + <NumberOfRestrictions>4</NumberOfRestrictions> <NumberOfIdentifierParts>0</NumberOfIdentifierParts> <PopulationMechanism>PrepareCollection</PopulationMechanism> </MetaDataCollections> @@ -331,6 +331,36 @@ <RestrictionNumber>4</RestrictionNumber> </Restrictions> <Restrictions> + <CollectionName>IndexColumns</CollectionName> + <RestrictionName>Catalog</RestrictionName> + <RestrictionDefault>table_catalog</RestrictionDefault> + <RestrictionNumber>1</RestrictionNumber> + </Restrictions> + <Restrictions> + <CollectionName>IndexColumns</CollectionName> + <RestrictionName>Schema</RestrictionName> + <RestrictionDefault>table_schema</RestrictionDefault> + <RestrictionNumber>2</RestrictionNumber> + </Restrictions> + <Restrictions> + <CollectionName>IndexColumns</CollectionName> + <RestrictionName>TableName</RestrictionName> + <RestrictionDefault>table_name</RestrictionDefault> + <RestrictionNumber>3</RestrictionNumber> + </Restrictions> + <Restrictions> + <CollectionName>IndexColumns</CollectionName> + <RestrictionName>Name</RestrictionName> + <RestrictionDefault>index_name</RestrictionDefault> + <RestrictionNumber>4</RestrictionNumber> + </Restrictions> + <Restrictions> + <CollectionName>IndexColumns</CollectionName> + <RestrictionName>ColumnName</RestrictionName> + <RestrictionDefault>column_name</RestrictionDefault> + <RestrictionNumber>5</RestrictionNumber> + </Restrictions> + <Restrictions> <CollectionName>Functions</CollectionName> <RestrictionName>Catalog</RestrictionName> <RestrictionDefault>function_catalog</RestrictionDefault> Modified: trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgColumns.cs =================================================================== --- trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgColumns.cs 2006-03-22 12:09:12 UTC (rev 44) +++ trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgColumns.cs 2006-03-22 12:10:58 UTC (rev 45) @@ -36,9 +36,9 @@ "numeric_scale, " + "ordinal_position, " + "case is_nullable " + - "when true then false " + - "when false then true " + - "end AS is_not_null, " + + "when 'NO' then false " + + "when 'YES' then true " + + "end AS is_nullable, " + "column_default, " + "character_octet_length, " + "character_set_catalog, " + Added: trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgForeignKeyColumns.cs =================================================================== --- trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgForeignKeyColumns.cs (rev 0) +++ trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgForeignKeyColumns.cs 2006-03-22 12:10:58 UTC (rev 45) @@ -0,0 +1,33 @@ +/* + * PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ + * + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * Copyright (c) 2003, 2006 Carlos Guzman Alvarez + * All Rights Reserved. + */ + +using System; + +namespace PostgreSql.Data.Schema +{ + internal class PgForeignKeyColumns : PgSchema + { + #region \xB7 Protected Methods \xB7 + + protected override string BuildSql(string[] restrictions) + { + throw new NotImplementedException(); + } + + #endregion + } +} Added: trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgForeignKeys.cs =================================================================== --- trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgForeignKeys.cs (rev 0) +++ trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgForeignKeys.cs 2006-03-22 12:10:58 UTC (rev 45) @@ -0,0 +1,33 @@ +/* + * PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ + * + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * Copyright (c) 2003, 2006 Carlos Guzman Alvarez + * All Rights Reserved. + */ + +using System; + +namespace PostgreSql.Data.Schema +{ + internal class PgForeignKeys : PgSchema + { + #region \xB7 Protected Methods \xB7 + + protected override string BuildSql(string[] restrictions) + { + throw new NotImplementedException(); + } + + #endregion + } +} Modified: trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgSchemaFactory.cs =================================================================== --- trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgSchemaFactory.cs 2006-03-22 12:09:12 UTC (rev 44) +++ trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgSchemaFactory.cs 2006-03-22 12:10:58 UTC (rev 45) @@ -106,10 +106,22 @@ schema = new PgIndexes(); break; + case "indexcolumns": + schema = new PgIndexColumns(); + break; + case "functions": schema = new PgFunctions(); break; + case "foreignkeys": + schema = new PgForeignKeys(); + break; + + case "foreignkeycolumns": + schema = new PgForeignKeyColumns(); + break; + case "primarykeys": schema = new PgPrimaryKeys(); break; @@ -125,6 +137,10 @@ case "views": schema = new PgViews(); break; + + case "viewcolumns": + schema = new PgViewColumns(); + break; } return schema.GetSchema(connection, collectionName, restrictions); Added: trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgViewColumns.cs =================================================================== --- trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgViewColumns.cs (rev 0) +++ trunk/pgsqlclient/source/PostgreSql/Data/Schema/PgViewColumns.cs 2006-03-22 12:10:58 UTC (rev 45) @@ -0,0 +1,33 @@ +/* + * PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+ + * + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. + * + * Software distributed under the License is distributed on + * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the License for the specific + * language governing rights and limitations under the License. + * + * Copyright (c) 2003, 2006 Carlos Guzman Alvarez + * All Rights Reserved. + */ + +using System; + +namespace PostgreSql.Data.Schema +{ + internal class PgViewColumns : PgSchema + { + #region \xB7 Protected Methods \xB7 + + protected override string BuildSql(string[] restrictions) + { + throw new NotImplementedException(); + } + + #endregion + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |