db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r393301 - /db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mssql/MSSqlModelReader.java
Date Tue, 11 Apr 2006 19:56:07 GMT
Author: tomdz
Date: Tue Apr 11 12:56:00 2006
New Revision: 393301

URL: http://svn.apache.org/viewcvs?rev=393301&view=rev
Log:
Added known table entry for sql server

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mssql/MSSqlModelReader.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mssql/MSSqlModelReader.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mssql/MSSqlModelReader.java?rev=393301&r1=393300&r2=393301&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mssql/MSSqlModelReader.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mssql/MSSqlModelReader.java Tue
Apr 11 12:56:00 2006
@@ -47,6 +47,8 @@
  */
 public class MSSqlModelReader extends JdbcModelReader
 {
+    /** Known system tables that Sql Server creates (e.g. automatic maintenance). */
+    private static final String[] KNOWN_SYSTEM_TABLES = { "dtproperties" };
 	/** The regular expression pattern for the ISO dates. */
 	private Pattern _isoDatePattern;
 	/** The regular expression pattern for the ISO times. */
@@ -83,6 +85,16 @@
      */
 	protected Table readTable(DatabaseMetaDataWrapper metaData, Map values) throws SQLException
 	{
+        String tableName = (String)values.get("TABLE_NAME");
+
+        for (int idx = 0; idx < KNOWN_SYSTEM_TABLES.length; idx++)
+        {
+            if (KNOWN_SYSTEM_TABLES[idx].equals(tableName))
+            {
+                return null;
+            }
+        }
+
         Table table = super.readTable(metaData, values);
 
         if (table != null)



Mime
View raw message