incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Connectors Framework > How to Write an Output Connector
Date Mon, 18 Oct 2010 18:57:00 GMT
Space: Apache Connectors Framework (https://cwiki.apache.org/confluence/display/CONNECTORS)
Page: How to Write an Output Connector (https://cwiki.apache.org/confluence/display/CONNECTORS/How+to+Write+an+Output+Connector)

Comment edited by Farzad :
---------------------------------------------------------------------
I was looking at the code for DBInterfacePostgreSQL in org.apache.manifoldcf.core.database
and looks like it is not setup to handle multiple primary keys.  Aren't primary keys suppose
to be listed together as a comma separated list?

  protected static void appendDescription(StringBuffer queryBuffer, String columnName, ColumnDescription
cd, boolean forceNull)
  {
    queryBuffer.append(columnName);
    queryBuffer.append(' ');
    queryBuffer.append(mapType(cd.getTypeString()));
    if (forceNull || cd.getIsNull())
      queryBuffer.append(" NULL");
    else
      queryBuffer.append(" NOT NULL");
    if (cd.getIsPrimaryKey())
      queryBuffer.append(" PRIMARY KEY");
    if (cd.getReferenceTable() != null)
    {
      queryBuffer.append(" REFERENCES ");
      queryBuffer.append(cd.getReferenceTable());
      queryBuffer.append('(');
      queryBuffer.append(cd.getReferenceColumn());
      queryBuffer.append(") ON DELETE");
      if (cd.getReferenceCascade())
        queryBuffer.append(" CASCADE");
      else
        queryBuffer.append(" RESTRICT");
    }
  }

Comment was previously :
---------------------------------------------------------------------
I was looking at the code for DBInterfacePostgreSQL in org.apache.manifoldcf.core.database
and looks like it is not setup to handle multiple primary keys.  Aren't primary keys suppose
to be listed together as a comma separated list?

Change your notification preferences: https://cwiki.apache.org/confluence/users/viewnotifications.action

Mime
View raw message