New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NpgsqlDataObjectSupport.xml #1597

Closed
dmitry-lipetsk opened this Issue Jun 10, 2017 · 10 comments

Comments

Projects
None yet
3 participants
@dmitry-lipetsk

dmitry-lipetsk commented Jun 10, 2017

Hello,

Your NpgsqlDataObjectSupport.xml contains the next definition for TableUniqueKeyColumn (mapped type):

    <MappedType name="TableUniqueKeyColumn" underlyingType="ConstraintColumns">
      <Selection restrictions="{Catalog}, {Schema}, {Table}, {UniqueKey}, {Name}" filter="constraint_type IN ('PRIMARY KEY', 'UNIQUE')" />
      <Identifier>
        <Part name="Catalog" underlyingMember="table_catalog" />
        <Part name="Schema" underlyingMember="table_schema" />
        <Part name="Table" underlyingMember="table_name" />
        <Part name="UniqueKey" underlyingMember="constraint_name" />
        <Part name="Name" underlyingMember="column_name" />
      </Identifier>
      <Properties>
        <Property name="Name" isIdentifierPart="true" />
        <Property name="Ordinal" underlyingMember="ordinal_position" />
      </Properties>
    </MappedType>

I not sure, but seem you shoud use the "TableUniqueKey" name instead "UniqueKey":

    <MappedType name="TableUniqueKeyColumn" underlyingType="ConstraintColumns">
      <Selection restrictions="{Catalog}, {Schema}, {Table}, {TableUniqueKey}, {Name}" filter="constraint_type IN ('PRIMARY KEY', 'UNIQUE')" />
      <Identifier>
        <Part name="Catalog" underlyingMember="table_catalog" />
        <Part name="Schema" underlyingMember="table_schema" />
        <Part name="Table" underlyingMember="table_name" />
        <Part name="TableUniqueKey" underlyingMember="constraint_name" />
        <Part name="Name" underlyingMember="column_name" />
      </Identifier>
      <Properties>
        <Property name="Name" isIdentifierPart="true" />
        <Property name="Ordinal" underlyingMember="ordinal_position" />
      </Properties>
    </MappedType>

See TableUniqueKeyColumn defintion in DDEX provider for MSSQL - it uses "TableUniqueKey" name.

		<MappedType name="TableUniqueKeyColumn" underlyingType="IndexColumn">
			<Selection restrictions="{Catalog},{Schema},{Table},{TableUniqueKey},{Name}" />
			<Identifier>
				<Part name="Catalog" underlyingMember="Database" />
				<Part name="Schema" underlyingMember="Schema" />
				<Part name="Table" underlyingMember="Table" />
				<Part name="TableUniqueKey" underlyingMember="Index" />
				<Part name="Name" underlyingMember="Name" />
			</Identifier>
			<Properties>
				<Property name="Name" isIdentifierPart="true" />
				<Property name="Ordinal" underlyingMember="Id" />
			</Properties>
		</MappedType>

With "UniqueKey" quiery builder (Visual Studio 2017) does not detect the primary key of table.

With "TableUniqueKey" - query builder works without problem.


I tested the own DDEX provider, not your :)

@roji

This comment has been minimized.

Show comment
Hide comment
@roji

roji Jun 10, 2017

Member

@dmitry-lipetsk, thanks for raising this, do you want to submit a PR which fixes this and which I could test?

Member

roji commented Jun 10, 2017

@dmitry-lipetsk, thanks for raising this, do you want to submit a PR which fixes this and which I could test?

@dmitry-lipetsk

This comment has been minimized.

Show comment
Hide comment
@dmitry-lipetsk

dmitry-lipetsk Jun 11, 2017

Hello,

I think, this issue with "UniqueKey" can be looked through next sequence:

  1. Select "New query" menu in database explorer tree
  2. Select and add table with primary key
  3. In rectangle with table columns, the primary key columns should be displayed with bold font

2017_06_11__npgsql

Trace of calls:

LCPI_DDEX2 [0000874] OleDbDataObjectEnumerator_TableUniqueKeys()
LCPI_DDEX2 [0000875] OleDbDataObjectEnumerator_TableUniqueKeys::GetSupportedRestrictions("TableUniqueKey",null) - ENTER
LCPI_DDEX2 [0000876] OleDbDataObjectEnumerator_TableUniqueKeys::GetSupportedRestrictions("TableUniqueKey",null) - {"TABLE_NAME","CONSTRAINT_NAME"}
LCPI_DDEX2 [0000877] OleDbDataObjectEnumerator_TableUniqueKeys::GetRequiredRestrictions("TableUniqueKey",null) - ENTER
LCPI_DDEX2 [0000878] OleDbDataObjectEnumerator_TableUniqueKeys::GetRequiredRestrictions("TableUniqueKey",null) - null
LCPI_DDEX2 [0000879] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000880] OleDbDataObjectEnumerator_TableUniqueKeys::SelectObjects("TableUniqueKey",{"COUNTRY",null},null,null)
LCPI_DDEX2 [0000881] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000882] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000883] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000884] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000885] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000886] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000887] OleDbDataObjectItemComparer::Compare("TableUniqueKey",identifier={"COUNTRY",null},0,"COUNTRY") - 0
LCPI_DDEX2 [0000888] OleDbDataObjectEnumerator_TableUniqueKeyColumns()
LCPI_DDEX2 [0000889] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetSupportedRestrictions("TableUniqueKeyColumn",null) - ENTER
LCPI_DDEX2 [0000890] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetSupportedRestrictions("TableUniqueKeyColumn",null) - {"TABLE_NAME","CONSTRAINT_NAME","COLUMN_NAME"}
LCPI_DDEX2 [0000891] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetRequiredRestrictions("TableUniqueKeyColumn",null) - ENTER
LCPI_DDEX2 [0000892] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetRequiredRestrictions("TableUniqueKeyColumn",null) - null
LCPI_DDEX2 [0000893] OleDbDataConnectionSupport::get_State - Open

>>>>>>> LCPI_DDEX2 [0000894] OleDbDataObjectEnumerator_TableUniqueKeyColumns::SelectObjects("TableUniqueKeyColumn",{"COUNTRY","INTEG_2",null},null,null)

LCPI_DDEX2 [0000895] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000896] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000897] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000898] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000899] OleDbDataObjectItemComparer::Compare("TableUniqueKeyColumn",identifier={"COUNTRY",null,null},0,"COUNTRY") - 0
LCPI_DDEX2 [0000900] OleDbDataObjectItemComparer::Compare("TableUniqueKeyColumn",identifier={"COUNTRY","INTEG_2",null},1,"INTEG_2") - 0
LCPI_DDEX2 [0000901] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000902] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000903] OleDbDataSourceInformation::RetrieveValue("DataSourceProduct") - "Firebird"

Here name of UniqueKey is "INTEG_2". See the

OleDbDataObjectEnumerator_TableUniqueKeyColumns::SelectObjects("TableUniqueKeyColumn",{"COUNTRY","INTEG_2",null},null,null)

When I use "UniqueKey" name (instead "TableUniqueKey"), I see the

OleDbDataObjectEnumerator_TableUniqueKeyColumns::SelectObjects("TableUniqueKeyColumn",{"COUNTRY","{UniqueKey}",null},null,null)

And, as result, SelectObjects returns the empty set.

I think, your DDEX provider (with "UniqueKey" name) has the same issue.

dmitry-lipetsk commented Jun 11, 2017

Hello,

I think, this issue with "UniqueKey" can be looked through next sequence:

  1. Select "New query" menu in database explorer tree
  2. Select and add table with primary key
  3. In rectangle with table columns, the primary key columns should be displayed with bold font

2017_06_11__npgsql

Trace of calls:

LCPI_DDEX2 [0000874] OleDbDataObjectEnumerator_TableUniqueKeys()
LCPI_DDEX2 [0000875] OleDbDataObjectEnumerator_TableUniqueKeys::GetSupportedRestrictions("TableUniqueKey",null) - ENTER
LCPI_DDEX2 [0000876] OleDbDataObjectEnumerator_TableUniqueKeys::GetSupportedRestrictions("TableUniqueKey",null) - {"TABLE_NAME","CONSTRAINT_NAME"}
LCPI_DDEX2 [0000877] OleDbDataObjectEnumerator_TableUniqueKeys::GetRequiredRestrictions("TableUniqueKey",null) - ENTER
LCPI_DDEX2 [0000878] OleDbDataObjectEnumerator_TableUniqueKeys::GetRequiredRestrictions("TableUniqueKey",null) - null
LCPI_DDEX2 [0000879] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000880] OleDbDataObjectEnumerator_TableUniqueKeys::SelectObjects("TableUniqueKey",{"COUNTRY",null},null,null)
LCPI_DDEX2 [0000881] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000882] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000883] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000884] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000885] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000886] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000887] OleDbDataObjectItemComparer::Compare("TableUniqueKey",identifier={"COUNTRY",null},0,"COUNTRY") - 0
LCPI_DDEX2 [0000888] OleDbDataObjectEnumerator_TableUniqueKeyColumns()
LCPI_DDEX2 [0000889] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetSupportedRestrictions("TableUniqueKeyColumn",null) - ENTER
LCPI_DDEX2 [0000890] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetSupportedRestrictions("TableUniqueKeyColumn",null) - {"TABLE_NAME","CONSTRAINT_NAME","COLUMN_NAME"}
LCPI_DDEX2 [0000891] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetRequiredRestrictions("TableUniqueKeyColumn",null) - ENTER
LCPI_DDEX2 [0000892] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetRequiredRestrictions("TableUniqueKeyColumn",null) - null
LCPI_DDEX2 [0000893] OleDbDataConnectionSupport::get_State - Open

>>>>>>> LCPI_DDEX2 [0000894] OleDbDataObjectEnumerator_TableUniqueKeyColumns::SelectObjects("TableUniqueKeyColumn",{"COUNTRY","INTEG_2",null},null,null)

LCPI_DDEX2 [0000895] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000896] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000897] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000898] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000899] OleDbDataObjectItemComparer::Compare("TableUniqueKeyColumn",identifier={"COUNTRY",null,null},0,"COUNTRY") - 0
LCPI_DDEX2 [0000900] OleDbDataObjectItemComparer::Compare("TableUniqueKeyColumn",identifier={"COUNTRY","INTEG_2",null},1,"INTEG_2") - 0
LCPI_DDEX2 [0000901] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000902] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000903] OleDbDataSourceInformation::RetrieveValue("DataSourceProduct") - "Firebird"

Here name of UniqueKey is "INTEG_2". See the

OleDbDataObjectEnumerator_TableUniqueKeyColumns::SelectObjects("TableUniqueKeyColumn",{"COUNTRY","INTEG_2",null},null,null)

When I use "UniqueKey" name (instead "TableUniqueKey"), I see the

OleDbDataObjectEnumerator_TableUniqueKeyColumns::SelectObjects("TableUniqueKeyColumn",{"COUNTRY","{UniqueKey}",null},null,null)

And, as result, SelectObjects returns the empty set.

I think, your DDEX provider (with "UniqueKey" name) has the same issue.

@roji

This comment has been minimized.

Show comment
Hide comment
@roji

roji Jun 11, 2017

Member

Thanks for the instructions, I'll take a look in the coming days. Are you working on another DDEX provider of your own (not Npgsql)?

Do you plan to submit a PR which fixes this problem?

Member

roji commented Jun 11, 2017

Thanks for the instructions, I'll take a look in the coming days. Are you working on another DDEX provider of your own (not Npgsql)?

Do you plan to submit a PR which fixes this problem?

@dmitry-lipetsk

This comment has been minimized.

Show comment
Hide comment
@dmitry-lipetsk

dmitry-lipetsk Jun 11, 2017

Thanks for the instructions, I'll take a look in the coming days. Are you working on another DDEX provider of your own (not Npgsql)?

Yes. It is DDEX provider for lcpi.data.oledb (see at nuget). I use your (and others) provider as base sample :)

Do you plan to submit a PR which fixes this problem?

No. I just want to inform you about possible problem :)

dmitry-lipetsk commented Jun 11, 2017

Thanks for the instructions, I'll take a look in the coming days. Are you working on another DDEX provider of your own (not Npgsql)?

Yes. It is DDEX provider for lcpi.data.oledb (see at nuget). I use your (and others) provider as base sample :)

Do you plan to submit a PR which fixes this problem?

No. I just want to inform you about possible problem :)

@roji

This comment has been minimized.

Show comment
Hide comment
@roji

roji Jun 11, 2017

Member

Ok thanks, I'll take a look. If you have experience with DDEX and can give us a hand (as you've done here) it would be greatly appreciated, I'm lacking DDEX experience (and time).

Member

roji commented Jun 11, 2017

Ok thanks, I'll take a look. If you have experience with DDEX and can give us a hand (as you've done here) it would be greatly appreciated, I'm lacking DDEX experience (and time).

@roji roji self-assigned this Jun 11, 2017

@roji roji added this to the 3.2.4 milestone Jun 11, 2017

@roji

This comment has been minimized.

Show comment
Hide comment
@roji

roji Jun 12, 2017

Member

@dmitry-lipetsk, I tried to simply change UniqueKey to TableUniqueKey as you suggest, with no visible effect:

<MappedType name="TableUniqueKeyColumn" underlyingType="ConstraintColumns">
  <Selection restrictions="{Catalog}, {Schema}, {Table}, {TableUniqueKey}, {Name}" filter="constraint_type IN ('PRIMARY KEY', 'UNIQUE')" />
  <Identifier>
	<Part name="Catalog" underlyingMember="table_catalog" />
	<Part name="Schema" underlyingMember="table_schema" />
	<Part name="Table" underlyingMember="table_name" />
	<Part name="TableUniqueKey" underlyingMember="constraint_name" />
	<Part name="Name" underlyingMember="column_name" />
  </Identifier>
  <Properties>
	<Property name="Name" isIdentifierPart="true" />
	<Property name="Ordinal" underlyingMember="ordinal_position" />
  </Properties>
</MappedType>

In my query builder, the key column still does not show up as bold. I tried looking around a bit but couldn't make it work - the lack of real, useful documentation on DDEX is really quite incredible.

Can you let me know how you got the DDEX trace log? I never saw that and it could be useful. I'm sure that you're right and that something isn't quite right in how Npgsql is doing things, but I don't have enough time to dive into this at the moment.

Member

roji commented Jun 12, 2017

@dmitry-lipetsk, I tried to simply change UniqueKey to TableUniqueKey as you suggest, with no visible effect:

<MappedType name="TableUniqueKeyColumn" underlyingType="ConstraintColumns">
  <Selection restrictions="{Catalog}, {Schema}, {Table}, {TableUniqueKey}, {Name}" filter="constraint_type IN ('PRIMARY KEY', 'UNIQUE')" />
  <Identifier>
	<Part name="Catalog" underlyingMember="table_catalog" />
	<Part name="Schema" underlyingMember="table_schema" />
	<Part name="Table" underlyingMember="table_name" />
	<Part name="TableUniqueKey" underlyingMember="constraint_name" />
	<Part name="Name" underlyingMember="column_name" />
  </Identifier>
  <Properties>
	<Property name="Name" isIdentifierPart="true" />
	<Property name="Ordinal" underlyingMember="ordinal_position" />
  </Properties>
</MappedType>

In my query builder, the key column still does not show up as bold. I tried looking around a bit but couldn't make it work - the lack of real, useful documentation on DDEX is really quite incredible.

Can you let me know how you got the DDEX trace log? I never saw that and it could be useful. I'm sure that you're right and that something isn't quite right in how Npgsql is doing things, but I don't have enough time to dive into this at the moment.

@dmitry-lipetsk

This comment has been minimized.

Show comment
Hide comment
@dmitry-lipetsk

dmitry-lipetsk Jun 12, 2017

Hello,

May be the problem with your "IsPrimary" property?

        <Property name="IsPrimary" underlyingMember="constraint_type">
          <Conversion>
            <Calculate expr="IIF({0} = 'PRIMARY KEY', true, false)" exprType="System.Boolean" />
          </Conversion>
        </Property>

Look to my ObjectSupport.xml (I generate it in runtime).

Types:

    <Type name="TableUniqueKey" preferredOrdering="TABLE_NAME,CONSTRAINT_NAME">
      <Identifier>
        <Part name="TABLE_NAME" type="System.String" />
        <Part name="CONSTRAINT_NAME" type="System.String" />
      </Identifier>
      <Properties>
        <Property name="TABLE_NAME" type="System.String" isIdentifierPart="true" />
        <Property name="CONSTRAINT_NAME" type="System.String" isIdentifierPart="true" />
        <Property name="CONSTRAINT_TYPE" type="System.String" />
        <Property name="LCPI_DATA_TOOLS__UNIQUE_KEY_COLUMN_NAMES" type="System.String" />
      </Properties>
      <Services>
        <Service type="IVsDataObjectSelector" implementationType="lcpi.vs.data.providers.oledb.v2.OleDbDataObjectEnumerator_TableUniqueKeys">
          <Parameters method="SelectObjects" />
        </Service>
      </Services>
    </Type>
    <Type name="TableUniqueKeyColumn" preferredOrdering="TABLE_NAME,CONSTRAINT_NAME,ORDINAL_POSITION">
      <Identifier>
        <Part name="TABLE_NAME" type="System.String" />
        <Part name="CONSTRAINT_NAME" type="System.String" />
        <Part name="COLUMN_NAME" type="System.String" />
      </Identifier>
      <Properties>
        <Property name="TABLE_NAME" type="System.String" isIdentifierPart="true" />
        <Property name="CONSTRAINT_NAME" type="System.String" isIdentifierPart="true" />
        <Property name="COLUMN_NAME" type="System.String" isIdentifierPart="true" />
        <Property name="ORDINAL_POSITION" type="System.UInt32" />
      </Properties>
      <Services>
        <Service type="IVsDataObjectSelector" implementationType="lcpi.vs.data.providers.oledb.v2.OleDbDataObjectEnumerator_TableUniqueKeyColumns">
          <Parameters method="SelectObjects" />
        </Service>
      </Services>
    </Type>

MappedTypes:

    <MappedType name="TableUniqueKey" underlyingType="TableUniqueKey">
      <Selection restrictions="{Table},{Name}" />
      <Identifier>
        <Part name="Table" underlyingMember="TABLE_NAME" />
        <Part name="Name" underlyingMember="CONSTRAINT_NAME" />
      </Identifier>
      <Properties>
        <Property name="Table" underlyingMember="TABLE_NAME" isIdentifierPart="true" />
        <Property name="Name" underlyingMember="CONSTRAINT_NAME" isIdentifierPart="true" />
        <Property name="IsPrimary" underlyingMember="CONSTRAINT_TYPE">
          <Conversion>
            <Calculate expr="{0}='PRIMARY KEY'" exprType="System.Boolean" />
          </Conversion>
        </Property>
      </Properties>
    </MappedType>
    <MappedType name="TableUniqueKeyColumn" underlyingType="TableUniqueKeyColumn">
      <Selection restrictions="{Table},{TableUniqueKey},{Name}" />
      <Identifier>
        <Part name="Table" underlyingMember="TABLE_NAME" />
        <Part name="TableUniqueKey" underlyingMember="CONSTRAINT_NAME" />
        <Part name="Name" underlyingMember="COLUMN_NAME" />
      </Identifier>
      <Properties>
        <Property name="Table" underlyingMember="TABLE_NAME" isIdentifierPart="true" />
        <Property name="TableUniqueKey" underlyingMember="CONSTRAINT_NAME" isIdentifierPart="true" />
        <Property name="Name" underlyingMember="COLUMN_NAME" isIdentifierPart="true" />
        <Property name="Ordinal" underlyingMember="ORDINAL_POSITION">
          <Conversion>
            <ChangeType type="System.Int32" />
          </Conversion>
        </Property>
      </Properties>
    </MappedType>

When I add the table "COUNTRY" (primary key column - "COUNTRY"), I get the next trace log:

LCPI_DDEX2 [0000797] OleDbDataSourceInformation::RetrieveValue("CatalogSupportedInDml") - false
LCPI_DDEX2 [0000798] OleDbDataSourceInformation::RetrieveValue("SchemaSupportedInDml") - false
LCPI_DDEX2 [0000799] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000800] OleDbDataObjectEnumerator_Tables::SelectObjects("Table",{"COUNTRY",null},null,null)
LCPI_DDEX2 [0000801] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000802] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000803] Schema_OleDb_Loader__PRIMARY_KEYS::GetSchemaTable()
LCPI_DDEX2 [0000804] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000805] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000806] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000807] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000808] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"COUNTRY") - 0
LCPI_DDEX2 [0000809] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"CUSTOMER") - -1
LCPI_DDEX2 [0000810] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"DEPARTMENT") - -1
LCPI_DDEX2 [0000811] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"EMPLOYEE") - -1
LCPI_DDEX2 [0000812] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"EMPLOYEE_PROJECT") - -1
LCPI_DDEX2 [0000813] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"JOB") - -1
LCPI_DDEX2 [0000814] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$ATTACHMENTS") - -1
LCPI_DDEX2 [0000815] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$CALL_STACK") - -1
LCPI_DDEX2 [0000816] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$CONTEXT_VARIABLES") - -1
LCPI_DDEX2 [0000817] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$DATABASE") - -1
LCPI_DDEX2 [0000818] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$IO_STATS") - -1
LCPI_DDEX2 [0000819] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$MEMORY_USAGE") - -1
LCPI_DDEX2 [0000820] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$RECORD_STATS") - -1
LCPI_DDEX2 [0000821] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$STATEMENTS") - -1
LCPI_DDEX2 [0000822] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$TABLE_STATS") - -1
LCPI_DDEX2 [0000823] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$TRANSACTIONS") - -1
LCPI_DDEX2 [0000824] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"PROJECT") - -1
LCPI_DDEX2 [0000825] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"PROJ_DEPT_BUDGET") - -1
LCPI_DDEX2 [0000826] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$AUTH_MAPPING") - -1
LCPI_DDEX2 [0000827] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$BACKUP_HISTORY") - -1
LCPI_DDEX2 [0000828] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$CHARACTER_SETS") - -1
LCPI_DDEX2 [0000829] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$CHECK_CONSTRAINTS") - -1
LCPI_DDEX2 [0000830] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$COLLATIONS") - -1
LCPI_DDEX2 [0000831] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$DATABASE") - -1
LCPI_DDEX2 [0000832] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$DB_CREATORS") - -1
LCPI_DDEX2 [0000833] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$DEPENDENCIES") - -1
LCPI_DDEX2 [0000834] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$EXCEPTIONS") - -1
LCPI_DDEX2 [0000835] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FIELDS") - -1
LCPI_DDEX2 [0000836] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FIELD_DIMENSIONS") - -1
LCPI_DDEX2 [0000837] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FILES") - -1
LCPI_DDEX2 [0000838] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FILTERS") - -1
LCPI_DDEX2 [0000839] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FORMATS") - -1
LCPI_DDEX2 [0000840] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FUNCTIONS") - -1
LCPI_DDEX2 [0000841] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FUNCTION_ARGUMENTS") - -1
LCPI_DDEX2 [0000842] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$GENERATORS") - -1
LCPI_DDEX2 [0000843] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$INDEX_SEGMENTS") - -1
LCPI_DDEX2 [0000844] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$INDICES") - -1
LCPI_DDEX2 [0000845] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$LOG_FILES") - -1
LCPI_DDEX2 [0000846] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$PACKAGES") - -1
LCPI_DDEX2 [0000847] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$PAGES") - -1
LCPI_DDEX2 [0000848] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$PROCEDURES") - -1
LCPI_DDEX2 [0000849] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$PROCEDURE_PARAMETERS") - -1
LCPI_DDEX2 [0000850] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$REF_CONSTRAINTS") - -1
LCPI_DDEX2 [0000851] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$RELATIONS") - -1
LCPI_DDEX2 [0000852] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$RELATION_CONSTRAINTS") - -1
LCPI_DDEX2 [0000853] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$RELATION_FIELDS") - -1
LCPI_DDEX2 [0000854] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$ROLES") - -1
LCPI_DDEX2 [0000855] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$SECURITY_CLASSES") - -1
LCPI_DDEX2 [0000856] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$TRANSACTIONS") - -1
LCPI_DDEX2 [0000857] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$TRIGGERS") - -1
LCPI_DDEX2 [0000858] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$TRIGGER_MESSAGES") - -1
LCPI_DDEX2 [0000859] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$TYPES") - -1
LCPI_DDEX2 [0000860] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$USER_PRIVILEGES") - -1
LCPI_DDEX2 [0000861] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$VIEW_RELATIONS") - -1
LCPI_DDEX2 [0000862] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SALARY_HISTORY") - -1
LCPI_DDEX2 [0000863] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SALES") - -1
LCPI_DDEX2 [0000864] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SEC$DB_CREATORS") - -1
LCPI_DDEX2 [0000865] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SEC$GLOBAL_AUTH_MAPPING") - -1
LCPI_DDEX2 [0000866] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SEC$USERS") - -1
LCPI_DDEX2 [0000867] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SEC$USER_ATTRIBUTES") - -1
LCPI_DDEX2 [0000868] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"COUNTRY") - 0
Вызвано исключение: "System.NotSupportedException" в Microsoft.VisualStudio.Data.Package.dll
LCPI_DDEX2 [0000869] OleDbDataObjectEnumerator_TableColumns()
LCPI_DDEX2 [0000870] OleDbDataObjectEnumerator_TableColumns::GetSupportedRestrictions("TableColumn",null) - ENTER
LCPI_DDEX2 [0000871] OleDbDataObjectEnumerator_TableColumns::GetSupportedRestrictions("TableColumn",null) - {"TABLE_NAME","COLUMN_NAME"}
LCPI_DDEX2 [0000872] OleDbDataObjectEnumerator_TableColumns::GetRequiredRestrictions("TableColumn",null) - ENTER
LCPI_DDEX2 [0000873] OleDbDataObjectEnumerator_TableColumns::GetRequiredRestrictions("TableColumn",null) - null
LCPI_DDEX2 [0000874] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000875] OleDbDataObjectEnumerator_TableColumns::SelectObjects("TableColumn",{"COUNTRY",null},null,null)
LCPI_DDEX2 [0000876] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000877] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000878] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000879] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000880] Schema_OleDb_Loader__PRIMARY_KEYS::GetSchemaTable()
LCPI_DDEX2 [0000881] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000882] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000883] OleDbDataObjectItemComparer::Compare("TableColumn",identifier={"COUNTRY",null},0,"COUNTRY") - 0
LCPI_DDEX2 [0000884] OleDbDataObjectItemComparer::Compare("TableColumn",propertyName="ORDINAL_POSITION",1,2) - -1
LCPI_DDEX2 [0000885] OleDbDataObjectEnumerator_TableUniqueKeys()
LCPI_DDEX2 [0000886] OleDbDataObjectEnumerator_TableUniqueKeys::GetSupportedRestrictions("TableUniqueKey",null) - ENTER
LCPI_DDEX2 [0000887] OleDbDataObjectEnumerator_TableUniqueKeys::GetSupportedRestrictions("TableUniqueKey",null) - {"TABLE_NAME","CONSTRAINT_NAME"}
LCPI_DDEX2 [0000888] OleDbDataObjectEnumerator_TableUniqueKeys::GetRequiredRestrictions("TableUniqueKey",null) - ENTER
LCPI_DDEX2 [0000889] OleDbDataObjectEnumerator_TableUniqueKeys::GetRequiredRestrictions("TableUniqueKey",null) - null
LCPI_DDEX2 [0000890] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000891] OleDbDataObjectEnumerator_TableUniqueKeys::SelectObjects("TableUniqueKey",{"COUNTRY",null},null,null)
LCPI_DDEX2 [0000892] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000893] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000894] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000895] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000896] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000897] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000898] OleDbDataObjectItemComparer::Compare("TableUniqueKey",identifier={"COUNTRY",null},0,"COUNTRY") - 0
LCPI_DDEX2 [0000899] OleDbDataObjectEnumerator_TableUniqueKeyColumns()
LCPI_DDEX2 [0000900] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetSupportedRestrictions("TableUniqueKeyColumn",null) - ENTER
LCPI_DDEX2 [0000901] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetSupportedRestrictions("TableUniqueKeyColumn",null) - {"TABLE_NAME","CONSTRAINT_NAME","COLUMN_NAME"}
LCPI_DDEX2 [0000902] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetRequiredRestrictions("TableUniqueKeyColumn",null) - ENTER
LCPI_DDEX2 [0000903] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetRequiredRestrictions("TableUniqueKeyColumn",null) - null
LCPI_DDEX2 [0000904] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000905] OleDbDataObjectEnumerator_TableUniqueKeyColumns::SelectObjects("TableUniqueKeyColumn",{"COUNTRY","INTEG_2",null},null,null)
LCPI_DDEX2 [0000906] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000907] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000908] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000909] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000910] OleDbDataObjectItemComparer::Compare("TableUniqueKeyColumn",identifier={"COUNTRY",null,null},0,"COUNTRY") - 0
LCPI_DDEX2 [0000911] OleDbDataObjectItemComparer::Compare("TableUniqueKeyColumn",identifier={"COUNTRY","INTEG_2",null},1,"INTEG_2") - 0

dmitry-lipetsk commented Jun 12, 2017

Hello,

May be the problem with your "IsPrimary" property?

        <Property name="IsPrimary" underlyingMember="constraint_type">
          <Conversion>
            <Calculate expr="IIF({0} = 'PRIMARY KEY', true, false)" exprType="System.Boolean" />
          </Conversion>
        </Property>

Look to my ObjectSupport.xml (I generate it in runtime).

Types:

    <Type name="TableUniqueKey" preferredOrdering="TABLE_NAME,CONSTRAINT_NAME">
      <Identifier>
        <Part name="TABLE_NAME" type="System.String" />
        <Part name="CONSTRAINT_NAME" type="System.String" />
      </Identifier>
      <Properties>
        <Property name="TABLE_NAME" type="System.String" isIdentifierPart="true" />
        <Property name="CONSTRAINT_NAME" type="System.String" isIdentifierPart="true" />
        <Property name="CONSTRAINT_TYPE" type="System.String" />
        <Property name="LCPI_DATA_TOOLS__UNIQUE_KEY_COLUMN_NAMES" type="System.String" />
      </Properties>
      <Services>
        <Service type="IVsDataObjectSelector" implementationType="lcpi.vs.data.providers.oledb.v2.OleDbDataObjectEnumerator_TableUniqueKeys">
          <Parameters method="SelectObjects" />
        </Service>
      </Services>
    </Type>
    <Type name="TableUniqueKeyColumn" preferredOrdering="TABLE_NAME,CONSTRAINT_NAME,ORDINAL_POSITION">
      <Identifier>
        <Part name="TABLE_NAME" type="System.String" />
        <Part name="CONSTRAINT_NAME" type="System.String" />
        <Part name="COLUMN_NAME" type="System.String" />
      </Identifier>
      <Properties>
        <Property name="TABLE_NAME" type="System.String" isIdentifierPart="true" />
        <Property name="CONSTRAINT_NAME" type="System.String" isIdentifierPart="true" />
        <Property name="COLUMN_NAME" type="System.String" isIdentifierPart="true" />
        <Property name="ORDINAL_POSITION" type="System.UInt32" />
      </Properties>
      <Services>
        <Service type="IVsDataObjectSelector" implementationType="lcpi.vs.data.providers.oledb.v2.OleDbDataObjectEnumerator_TableUniqueKeyColumns">
          <Parameters method="SelectObjects" />
        </Service>
      </Services>
    </Type>

MappedTypes:

    <MappedType name="TableUniqueKey" underlyingType="TableUniqueKey">
      <Selection restrictions="{Table},{Name}" />
      <Identifier>
        <Part name="Table" underlyingMember="TABLE_NAME" />
        <Part name="Name" underlyingMember="CONSTRAINT_NAME" />
      </Identifier>
      <Properties>
        <Property name="Table" underlyingMember="TABLE_NAME" isIdentifierPart="true" />
        <Property name="Name" underlyingMember="CONSTRAINT_NAME" isIdentifierPart="true" />
        <Property name="IsPrimary" underlyingMember="CONSTRAINT_TYPE">
          <Conversion>
            <Calculate expr="{0}='PRIMARY KEY'" exprType="System.Boolean" />
          </Conversion>
        </Property>
      </Properties>
    </MappedType>
    <MappedType name="TableUniqueKeyColumn" underlyingType="TableUniqueKeyColumn">
      <Selection restrictions="{Table},{TableUniqueKey},{Name}" />
      <Identifier>
        <Part name="Table" underlyingMember="TABLE_NAME" />
        <Part name="TableUniqueKey" underlyingMember="CONSTRAINT_NAME" />
        <Part name="Name" underlyingMember="COLUMN_NAME" />
      </Identifier>
      <Properties>
        <Property name="Table" underlyingMember="TABLE_NAME" isIdentifierPart="true" />
        <Property name="TableUniqueKey" underlyingMember="CONSTRAINT_NAME" isIdentifierPart="true" />
        <Property name="Name" underlyingMember="COLUMN_NAME" isIdentifierPart="true" />
        <Property name="Ordinal" underlyingMember="ORDINAL_POSITION">
          <Conversion>
            <ChangeType type="System.Int32" />
          </Conversion>
        </Property>
      </Properties>
    </MappedType>

When I add the table "COUNTRY" (primary key column - "COUNTRY"), I get the next trace log:

LCPI_DDEX2 [0000797] OleDbDataSourceInformation::RetrieveValue("CatalogSupportedInDml") - false
LCPI_DDEX2 [0000798] OleDbDataSourceInformation::RetrieveValue("SchemaSupportedInDml") - false
LCPI_DDEX2 [0000799] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000800] OleDbDataObjectEnumerator_Tables::SelectObjects("Table",{"COUNTRY",null},null,null)
LCPI_DDEX2 [0000801] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000802] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000803] Schema_OleDb_Loader__PRIMARY_KEYS::GetSchemaTable()
LCPI_DDEX2 [0000804] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000805] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000806] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000807] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000808] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"COUNTRY") - 0
LCPI_DDEX2 [0000809] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"CUSTOMER") - -1
LCPI_DDEX2 [0000810] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"DEPARTMENT") - -1
LCPI_DDEX2 [0000811] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"EMPLOYEE") - -1
LCPI_DDEX2 [0000812] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"EMPLOYEE_PROJECT") - -1
LCPI_DDEX2 [0000813] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"JOB") - -1
LCPI_DDEX2 [0000814] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$ATTACHMENTS") - -1
LCPI_DDEX2 [0000815] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$CALL_STACK") - -1
LCPI_DDEX2 [0000816] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$CONTEXT_VARIABLES") - -1
LCPI_DDEX2 [0000817] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$DATABASE") - -1
LCPI_DDEX2 [0000818] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$IO_STATS") - -1
LCPI_DDEX2 [0000819] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$MEMORY_USAGE") - -1
LCPI_DDEX2 [0000820] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$RECORD_STATS") - -1
LCPI_DDEX2 [0000821] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$STATEMENTS") - -1
LCPI_DDEX2 [0000822] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$TABLE_STATS") - -1
LCPI_DDEX2 [0000823] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"MON$TRANSACTIONS") - -1
LCPI_DDEX2 [0000824] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"PROJECT") - -1
LCPI_DDEX2 [0000825] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"PROJ_DEPT_BUDGET") - -1
LCPI_DDEX2 [0000826] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$AUTH_MAPPING") - -1
LCPI_DDEX2 [0000827] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$BACKUP_HISTORY") - -1
LCPI_DDEX2 [0000828] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$CHARACTER_SETS") - -1
LCPI_DDEX2 [0000829] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$CHECK_CONSTRAINTS") - -1
LCPI_DDEX2 [0000830] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$COLLATIONS") - -1
LCPI_DDEX2 [0000831] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$DATABASE") - -1
LCPI_DDEX2 [0000832] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$DB_CREATORS") - -1
LCPI_DDEX2 [0000833] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$DEPENDENCIES") - -1
LCPI_DDEX2 [0000834] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$EXCEPTIONS") - -1
LCPI_DDEX2 [0000835] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FIELDS") - -1
LCPI_DDEX2 [0000836] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FIELD_DIMENSIONS") - -1
LCPI_DDEX2 [0000837] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FILES") - -1
LCPI_DDEX2 [0000838] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FILTERS") - -1
LCPI_DDEX2 [0000839] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FORMATS") - -1
LCPI_DDEX2 [0000840] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FUNCTIONS") - -1
LCPI_DDEX2 [0000841] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$FUNCTION_ARGUMENTS") - -1
LCPI_DDEX2 [0000842] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$GENERATORS") - -1
LCPI_DDEX2 [0000843] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$INDEX_SEGMENTS") - -1
LCPI_DDEX2 [0000844] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$INDICES") - -1
LCPI_DDEX2 [0000845] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$LOG_FILES") - -1
LCPI_DDEX2 [0000846] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$PACKAGES") - -1
LCPI_DDEX2 [0000847] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$PAGES") - -1
LCPI_DDEX2 [0000848] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$PROCEDURES") - -1
LCPI_DDEX2 [0000849] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$PROCEDURE_PARAMETERS") - -1
LCPI_DDEX2 [0000850] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$REF_CONSTRAINTS") - -1
LCPI_DDEX2 [0000851] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$RELATIONS") - -1
LCPI_DDEX2 [0000852] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$RELATION_CONSTRAINTS") - -1
LCPI_DDEX2 [0000853] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$RELATION_FIELDS") - -1
LCPI_DDEX2 [0000854] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$ROLES") - -1
LCPI_DDEX2 [0000855] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$SECURITY_CLASSES") - -1
LCPI_DDEX2 [0000856] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$TRANSACTIONS") - -1
LCPI_DDEX2 [0000857] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$TRIGGERS") - -1
LCPI_DDEX2 [0000858] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$TRIGGER_MESSAGES") - -1
LCPI_DDEX2 [0000859] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$TYPES") - -1
LCPI_DDEX2 [0000860] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$USER_PRIVILEGES") - -1
LCPI_DDEX2 [0000861] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"RDB$VIEW_RELATIONS") - -1
LCPI_DDEX2 [0000862] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SALARY_HISTORY") - -1
LCPI_DDEX2 [0000863] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SALES") - -1
LCPI_DDEX2 [0000864] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SEC$DB_CREATORS") - -1
LCPI_DDEX2 [0000865] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SEC$GLOBAL_AUTH_MAPPING") - -1
LCPI_DDEX2 [0000866] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SEC$USERS") - -1
LCPI_DDEX2 [0000867] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"SEC$USER_ATTRIBUTES") - -1
LCPI_DDEX2 [0000868] OleDbDataObjectItemComparer::Compare("Table",identifier={"COUNTRY"},0,"COUNTRY") - 0
Вызвано исключение: "System.NotSupportedException" в Microsoft.VisualStudio.Data.Package.dll
LCPI_DDEX2 [0000869] OleDbDataObjectEnumerator_TableColumns()
LCPI_DDEX2 [0000870] OleDbDataObjectEnumerator_TableColumns::GetSupportedRestrictions("TableColumn",null) - ENTER
LCPI_DDEX2 [0000871] OleDbDataObjectEnumerator_TableColumns::GetSupportedRestrictions("TableColumn",null) - {"TABLE_NAME","COLUMN_NAME"}
LCPI_DDEX2 [0000872] OleDbDataObjectEnumerator_TableColumns::GetRequiredRestrictions("TableColumn",null) - ENTER
LCPI_DDEX2 [0000873] OleDbDataObjectEnumerator_TableColumns::GetRequiredRestrictions("TableColumn",null) - null
LCPI_DDEX2 [0000874] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000875] OleDbDataObjectEnumerator_TableColumns::SelectObjects("TableColumn",{"COUNTRY",null},null,null)
LCPI_DDEX2 [0000876] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000877] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000878] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000879] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000880] Schema_OleDb_Loader__PRIMARY_KEYS::GetSchemaTable()
LCPI_DDEX2 [0000881] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000882] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000883] OleDbDataObjectItemComparer::Compare("TableColumn",identifier={"COUNTRY",null},0,"COUNTRY") - 0
LCPI_DDEX2 [0000884] OleDbDataObjectItemComparer::Compare("TableColumn",propertyName="ORDINAL_POSITION",1,2) - -1
LCPI_DDEX2 [0000885] OleDbDataObjectEnumerator_TableUniqueKeys()
LCPI_DDEX2 [0000886] OleDbDataObjectEnumerator_TableUniqueKeys::GetSupportedRestrictions("TableUniqueKey",null) - ENTER
LCPI_DDEX2 [0000887] OleDbDataObjectEnumerator_TableUniqueKeys::GetSupportedRestrictions("TableUniqueKey",null) - {"TABLE_NAME","CONSTRAINT_NAME"}
LCPI_DDEX2 [0000888] OleDbDataObjectEnumerator_TableUniqueKeys::GetRequiredRestrictions("TableUniqueKey",null) - ENTER
LCPI_DDEX2 [0000889] OleDbDataObjectEnumerator_TableUniqueKeys::GetRequiredRestrictions("TableUniqueKey",null) - null
LCPI_DDEX2 [0000890] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000891] OleDbDataObjectEnumerator_TableUniqueKeys::SelectObjects("TableUniqueKey",{"COUNTRY",null},null,null)
LCPI_DDEX2 [0000892] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000893] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000894] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000895] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000896] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000897] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000898] OleDbDataObjectItemComparer::Compare("TableUniqueKey",identifier={"COUNTRY",null},0,"COUNTRY") - 0
LCPI_DDEX2 [0000899] OleDbDataObjectEnumerator_TableUniqueKeyColumns()
LCPI_DDEX2 [0000900] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetSupportedRestrictions("TableUniqueKeyColumn",null) - ENTER
LCPI_DDEX2 [0000901] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetSupportedRestrictions("TableUniqueKeyColumn",null) - {"TABLE_NAME","CONSTRAINT_NAME","COLUMN_NAME"}
LCPI_DDEX2 [0000902] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetRequiredRestrictions("TableUniqueKeyColumn",null) - ENTER
LCPI_DDEX2 [0000903] OleDbDataObjectEnumerator_TableUniqueKeyColumns::GetRequiredRestrictions("TableUniqueKeyColumn",null) - null
LCPI_DDEX2 [0000904] OleDbDataConnectionSupport::get_State - Open
LCPI_DDEX2 [0000905] OleDbDataObjectEnumerator_TableUniqueKeyColumns::SelectObjects("TableUniqueKeyColumn",{"COUNTRY","INTEG_2",null},null,null)
LCPI_DDEX2 [0000906] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000907] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000908] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000909] OleDbDataConnectionSupport::get_ProviderObject - lcpi.data.oledb.OleDbConnection
LCPI_DDEX2 [0000910] OleDbDataObjectItemComparer::Compare("TableUniqueKeyColumn",identifier={"COUNTRY",null,null},0,"COUNTRY") - 0
LCPI_DDEX2 [0000911] OleDbDataObjectItemComparer::Compare("TableUniqueKeyColumn",identifier={"COUNTRY","INTEG_2",null},1,"INTEG_2") - 0

@roji roji modified the milestones: 3.2.4, 3.2.5 Jun 13, 2017

@roji roji modified the milestone: 3.2.5 Jul 25, 2017

@higuchi-daisuke

This comment has been minimized.

Show comment
Hide comment
@higuchi-daisuke

higuchi-daisuke Nov 1, 2017

Contributor

Hello,

I have a plan to submit a PR which fixes this.

Could you tell me which DDEX tests should be run?
Currently, automated tests (npgsql/test/Npgsql.Tests) were already passed,
and I confirmed that the primary key column was displayed with bold font in querybuilder.
Are there other tests to be run?

Contributor

higuchi-daisuke commented Nov 1, 2017

Hello,

I have a plan to submit a PR which fixes this.

Could you tell me which DDEX tests should be run?
Currently, automated tests (npgsql/test/Npgsql.Tests) were already passed,
and I confirmed that the primary key column was displayed with bold font in querybuilder.
Are there other tests to be run?

@roji

This comment has been minimized.

Show comment
Hide comment
@roji

roji Nov 1, 2017

Member

@higuchi-daisuke IIRC there are no automated tests (in Npgsql.Tests) which do anything DDEX-related - the only way to test is to build the VSIX and see the effect of your modification.

Member

roji commented Nov 1, 2017

@higuchi-daisuke IIRC there are no automated tests (in Npgsql.Tests) which do anything DDEX-related - the only way to test is to build the VSIX and see the effect of your modification.

@higuchi-daisuke

This comment has been minimized.

Show comment
Hide comment
@higuchi-daisuke

higuchi-daisuke Nov 1, 2017

Contributor

@roji Thank you for this information. I will submit a PR later.

Contributor

higuchi-daisuke commented Nov 1, 2017

@roji Thank you for this information. I will submit a PR later.

higuchi-daisuke pushed a commit to higuchi-daisuke/npgsql that referenced this issue Nov 1, 2017

@roji roji closed this in 7a3a112 Nov 5, 2017

roji added a commit that referenced this issue Nov 5, 2017

Correct VSIX detection for primary keys
Fixes #1597
(cherry picked from commit 7a3a112)

roji added a commit that referenced this issue Nov 9, 2017

Correct VSIX detection for primary keys
Fixes #1597
(cherry picked from commit 7a3a112)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment