Hello:
Hi Carlos,

in project file for FirebirdClint (latest version) are two files that
are not in SVN:
StoreSchemaDefinition.ssdl
StoreSchemaMapping.msl

Could you please commit them?
Attached to this email, sorry.
OT: Seems that you'll have no free time. ;)
:)


--
Carlos Guzmán Álvarez
Vigo-Spain


<?xml version="1.0" encoding="utf-8"?>
<!--
   <copyright file="SampleProviderServices.StoreSchemaDefinition.ssdl" company="Microsoft">
        Copyright (c) Microsoft Corporation.  All rights reserved.
   </copyright>

   <Provider_Writer_Tech_Preview_notes>
        This SSDL file defines the store schema for catalog schema such as tables, views, columns, etc.
   </Provider_Writer_Tech_Preview_notes>
-->
<Schema Namespace="FirebirdClient" Alias="Self" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl";>
  <EntityContainer Name="Schema">
    <EntitySet Name="STables" EntityType="Self.Table" >
      <DefiningQuery>
        SELECT 
              TABLE_SCHEMA + TABLE_NAME [Id]
          ,   TABLE_CATALOG [Catalog]
	        ,   TABLE_SCHEMA	[Schema]				
	        ,   TABLE_NAME    [Name]
        FROM
              INFORMATION_SCHEMA.TABLES
		    WHERE
              TABLE_TYPE = 'BASE TABLE'
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SColumns" EntityType="Self.Column" >
      <DefiningQuery>
        SELECT 
              c.TABLE_SCHEMA + c.TABLE_NAME + c.COLUMN_NAME [Id]
          ,   c.TABLE_SCHEMA + c.TABLE_NAME [TableId]
          ,   c.COLUMN_NAME   [Name]
          ,   c.ORDINAL_POSITION [Ordinal]
	        ,   CAST( CASE c.IS_NULLABLE WHEN 'YES' THEN 1 WHEN 'NO' THEN 0 ELSE 0 END as bit) [Nullable]
	        ,   CASE
					      WHEN c.DATA_TYPE in ('varchar', 'nvarchar', 'varbinary') and
                                c.CHARACTER_MAXIMUM_LENGTH = -1 THEN
							      c.DATA_TYPE + '(max)'
					      ELSE
						          c.DATA_TYPE
				      END
 			        as [Type]
	        ,   c.CHARACTER_MAXIMUM_LENGTH [MaxLength]
	        ,   c.NUMERIC_PRECISION [Precision]
	        ,   c.NUMERIC_SCALE [Scale]
	        ,   columnproperty( object_id( c.TABLE_SCHEMA + '.' +  c.TABLE_NAME ), c.COLUMN_NAME, 'IsIdentity' )/* |
              columnproperty( object_id( c.TABLE_SCHEMA + '.' +  c.TABLE_NAME ), c.COLUMN_NAME, 'IsRowGuidCol' )*/
              as [StoreGenerated]
        FROM
	            INFORMATION_SCHEMA.COLUMNS c
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SPrimaryKeys" EntityType="Self.PrimaryKey" >
      <DefiningQuery>
        SELECT 
              kc.TABLE_SCHEMA + kc.TABLE_NAME + kc.COLUMN_NAME [Id]
          ,   kc.TABLE_SCHEMA + kc.TABLE_NAME + kc.COLUMN_NAME [ColumnId]
          ,   kc.CONSTRAINT_NAME [Name]
          ,   kc.ORDINAL_POSITION [Ordinal]
        FROM
	            INFORMATION_SCHEMA.TABLE_CONSTRAINTS pk
	            INNER JOIN
	            INFORMATION_SCHEMA.KEY_COLUMN_USAGE kc on
		            kc.CONSTRAINT_SCHEMA = pk.CONSTRAINT_SCHEMA
		            AND kc.CONSTRAINT_NAME = pk.CONSTRAINT_NAME
        WHERE 	
                pk.CONSTRAINT_TYPE = 'PRIMARY KEY'
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SRelationships" EntityType="Self.Relationship" >
      <DefiningQuery>
        SELECT 
              CONSTRAINT_SCHEMA + CONSTRAINT_NAME [Id] 
		      ,   CONSTRAINT_NAME    [Name]
        FROM
              INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SRelationshipColumnMaps" EntityType="Self.RelationshipColumnMap" >
      <DefiningQuery>
        SELECT   
            FC.CONSTRAINT_SCHEMA + FC.CONSTRAINT_NAME + cast(FC.ORDINAL_POSITION as nvarchar(30)) [Id] 
        ,   PC.TABLE_SCHEMA + PC.TABLE_NAME  + PC.COLUMN_NAME  [FromColumnId]
        ,   FC.TABLE_SCHEMA + FC.TABLE_NAME  + FC.COLUMN_NAME  [ToColumnId]
        ,   FC.CONSTRAINT_SCHEMA + FC.CONSTRAINT_NAME [RelationshipId] 
        ,   FC.ORDINAL_POSITION [MapOrdinal]
        FROM 
          INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS AS RC
            INNER JOIN 
          INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS PC /* PRIMARY KEY COLS*/
            ON       RC.UNIQUE_CONSTRAINT_SCHEMA  = PC.CONSTRAINT_SCHEMA
            AND      RC.UNIQUE_CONSTRAINT_NAME    = PC.CONSTRAINT_NAME
            INNER JOIN 
          INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS FC /* FOREIGN KEY COLS*/
            ON       RC.CONSTRAINT_SCHEMA  = FC.CONSTRAINT_SCHEMA
            AND      RC.CONSTRAINT_NAME    = FC.CONSTRAINT_NAME
            AND      PC.ORDINAL_POSITION = FC.ORDINAL_POSITION      </DefiningQuery>
    </EntitySet>
    <AssociationSet Name="SColumnPrimaryKeys" Association="Self.ColumnPrimaryKey"/>
    <AssociationSet Name="SRelationshipRelationshipColumnMaps" Association="Self.RelationshipRelationshipColumnMap"/>
    <AssociationSet Name="SFromColumnRelationshipColumnMaps" Association="Self.FromColumnRelationshipColumnMap"/>
    <AssociationSet Name="SToColumnRelationshipColumnMaps" Association="Self.ToColumnRelationshipColumnMap"/>
    <AssociationSet Name="STableColumns" Association="Self.TableColumn"/>
  </EntityContainer>
  
  <EntityType Name="Table" Key="Id">
    <Property Name="Id" Nullable="false" Type="nvarchar(max)"/>
    <Property Name="Catalog" Type="nvarchar" MaxLength="256"/>
    <Property Name="Schema" Nullable="false" Type="nvarchar" MaxLength="256"/>
    <Property Name="Name" Nullable="false" Type="nvarchar" MaxLength="256"/>
  </EntityType>

  <EntityType Name="Column" Key="Id">
    <Property Name="Id" Nullable="false" Type="nvarchar(max)"/>
    <Property Name="Name" Nullable="false" Type="nvarchar" MaxLength="256"/>
    <Property Name="Ordinal" Nullable="false" Type="int" />
    <Property Name="Nullable" Nullable="false" Type="bit" />
    <Property Name="Type" Nullable="false" Type="nvarchar" MaxLength="256" />
    <Property Name="MaxLength" Type="int" />
    <Property Name="Precision" Type="int" />
    <Property Name="Scale" Type="int" />
    <Property Name="StoreGenerated" Nullable="false" Type="bit" />
    <Property Name="TableId" Nullable="false" Type="nvarchar(max)"/>
  </EntityType>

  <EntityType Name="PrimaryKey" Key="Id">
    <Property Name="Id" Nullable="false" Type="nvarchar(max)"/>
    <Property Name="ColumnId" Nullable="false" Type="nvarchar(max)"/>
    <Property Name="Name" Nullable="false" MaxLength="256" Type="nvarchar" />
    <Property Name="Ordinal" Nullable="false" Type="int" />
    <NavigationProperty Relationship="Self.ColumnPrimaryKey" Name="Column" FromRole="PrimaryKey" ToRole="Column" />
  </EntityType>
  
  <EntityType Name="Relationship" Key="Id">
    <Property Name="Id" Nullable="false" Type="nvarchar(max)"/>
    <Property Name="Name" Nullable="false" MaxLength="256" Type="nvarchar" />
  </EntityType>

  <EntityType Name="RelationshipColumnMap" Key="Id">
    <Property Name="Id" Nullable="false" Type="nvarchar(max)"/>
    <Property Name="MapOrdinal" Nullable="false" Type="int" />
    <Property Name="RelationshipId" Nullable="false" Type="nvarchar(max)" />
    <Property Name="FromColumnId" Nullable="false" Type="nvarchar(max)" />
    <Property Name="ToColumnId" Nullable="false" Type="nvarchar(max)" />
  </EntityType>

  <Association Name="ColumnPrimaryKey">
    <End Type="Self.Column" Role="Column" Multiplicity="1" />
    <End Type="Self.PrimaryKey" Role="PrimaryKey" Multiplicity="0..1" />
    <ReferentialConstraint FromRole="Column" FromProperty="Id"
                           ToRole="PrimaryKey" ToProperty="Id"/>
  </Association>

  
  <Association Name="RelationshipRelationshipColumnMap">
    <End PluralRole="Relationships" Type="Self.Relationship" Role="Relationship" Multiplicity="1" />
    <End PluralRole="RelationshipColumnMaps" Type="Self.RelationshipColumnMap" Role="RelationshipColumnMap" Multiplicity="*" />
    <ReferentialConstraint FromRole="Relationship" 
                           ToRole="RelationshipColumnMap" 
                           FromProperty="Id" 
                           ToProperty="RelationshipId"/>
  </Association>
 
  <Association Name="FromColumnRelationshipColumnMap">
    <End PluralRole="Columns" Type="Self.Column" Role="Column" Multiplicity="1" />
    <End PluralRole="RelationshipColumnMaps" Type="Self.RelationshipColumnMap" Role="RelationshipColumnMap" Multiplicity="*" />
    <ReferentialConstraint FromRole="Column" 
                           ToRole="RelationshipColumnMap" 
                           FromProperty="Id" 
                           ToProperty="FromColumnId"/>
  </Association>

  <Association Name="ToColumnRelationshipColumnMap">
    <End PluralRole="Columns" Type="Self.Column" Role="Column" Multiplicity="1" />
    <End PluralRole="RelationshipColumnMaps" Type="Self.RelationshipColumnMap" Role="RelationshipColumnMap" Multiplicity="*" />
    <ReferentialConstraint FromRole="Column" 
                           ToRole="RelationshipColumnMap" 
                           FromProperty="Id" 
                           ToProperty="ToColumnId"/>
  </Association>

  <Association Name="TableColumn">
    <End Type="Self.Table" Role="Table" Multiplicity="1" />
    <End Type="Self.Column" Role="Column" Multiplicity="*" />
    <ReferentialConstraint FromRole="Table" ToRole="Column" FromProperty="Id" ToProperty="TableId"/>
  </Association>

</Schema>
<?xml version="1.0" encoding="utf-8"?>
<!--
   <copyright file="SampleProviderServices.StoreSchemaMapping.msl" company="Microsoft">
        Copyright (c) Microsoft Corporation.  All rights reserved.
   </copyright>

   <Provider_Writer_Tech_Preview_notes>
        This MSL file maps the conceptual catalog schema for information such as tables, views, columns, etc.
        to the store-specific schema specified in the corresponding SSDL file
   </Provider_Writer_Tech_Preview_notes>
-->
<Mapping xmlns:cs="urn:schemas-microsoft-com:windows:storage:mapping:CS" cs:Space="C-S" xmlns="urn:schemas-microsoft-com:windows:storage:mapping:CS">
  <cs:EntityContainerMapping cs:StorageEntityContainer="Schema" cs:CdmEntityContainer="SchemaInformation">
    <cs:EntitySetMapping cs:Name="Tables" cs:TableName="STables" cs:TypeName="Provider.Table">
      <cs:ScalarProperty cs:Name="Id" cs:ColumnName="Id" />
      <cs:ScalarProperty cs:Name="Catalog" cs:ColumnName="Catalog" />
      <cs:ScalarProperty cs:Name="Schema" cs:ColumnName="Schema" />
      <cs:ScalarProperty cs:Name="Name" cs:ColumnName="Name" />
    </cs:EntitySetMapping>

    <cs:EntitySetMapping cs:Name="Columns" cs:TableName="SColumns" cs:TypeName="Provider.Column">
      <cs:ScalarProperty cs:Name="Id" cs:ColumnName="Id" />
      <cs:ScalarProperty cs:Name="Name" cs:ColumnName="Name" />
      <cs:ScalarProperty cs:Name="Ordinal" cs:ColumnName="Ordinal" />
      <cs:ScalarProperty cs:Name="Nullable" cs:ColumnName="Nullable" />
      <cs:ScalarProperty cs:Name="Type" cs:ColumnName="Type" />
      <cs:ScalarProperty cs:Name="MaxLength" cs:ColumnName="MaxLength" />
      <cs:ScalarProperty cs:Name="Precision" cs:ColumnName="Precision" />
      <cs:ScalarProperty cs:Name="Scale" cs:ColumnName="Scale" />
      <cs:ScalarProperty cs:Name="StoreGenerated" cs:ColumnName="StoreGenerated" />
    </cs:EntitySetMapping>
    
    <cs:EntitySetMapping cs:Name="PrimaryKeys" cs:TableName="SPrimaryKeys" cs:TypeName="Provider.PrimaryKey">
      <cs:ScalarProperty cs:Name="Id" cs:ColumnName="Id" />
      <cs:ScalarProperty cs:Name="Name" cs:ColumnName="Name" />
      <cs:ScalarProperty cs:Name="Ordinal" cs:ColumnName="Ordinal" />
    </cs:EntitySetMapping>

    <cs:EntitySetMapping cs:Name="Relationships" cs:TableName="SRelationships" cs:TypeName="Provider.Relationship">
      <cs:ScalarProperty cs:Name="Id" cs:ColumnName="Id" />
      <cs:ScalarProperty cs:Name="Name" cs:ColumnName="Name" />
    </cs:EntitySetMapping>
    
    <cs:EntitySetMapping cs:Name="RelationshipColumnMaps" cs:TableName="SRelationshipColumnMaps" cs:TypeName="Provider.RelationshipColumnMap">
      <cs:ScalarProperty cs:Name="Id" cs:ColumnName="Id" />
      <cs:ScalarProperty cs:Name="Ordinal" cs:ColumnName="MapOrdinal" />
    </cs:EntitySetMapping>

    <cs:AssociationSetMapping cs:Name="ColumnPrimaryKeys" cs:TableName="SPrimaryKeys" cs:TypeName="Provider.ColumnPrimaryKey">
      <cs:EndProperty cs:Name="Column">
        <cs:ScalarProperty cs:Name="Id" cs:ColumnName="ColumnId"/>
      </cs:EndProperty>
      <cs:EndProperty cs:Name="PrimaryKey">
        <cs:ScalarProperty cs:Name="Id" cs:ColumnName="Id"/>
      </cs:EndProperty>
    </cs:AssociationSetMapping>

    <cs:AssociationSetMapping cs:Name="RelationshipRelationshipColumnMaps" cs:TableName="SRelationshipColumnMaps" cs:TypeName="Provider.RelationshipRelationshipColumnMap">
      <cs:EndProperty cs:Name="Relationship">
        <cs:ScalarProperty cs:Name="Id" cs:ColumnName="RelationshipId"/>
      </cs:EndProperty>
      <cs:EndProperty cs:Name="RelationshipColumnMap">
        <cs:ScalarProperty cs:Name="Id" cs:ColumnName="Id"/>
      </cs:EndProperty>
    </cs:AssociationSetMapping>

    <cs:AssociationSetMapping cs:Name="FromColumnRelationshipColumnMaps" cs:TableName="SRelationshipColumnMaps" cs:TypeName="Provider.FromColumnRelationshipColumnMap">
      <cs:EndProperty cs:Name="Column">
        <cs:ScalarProperty cs:Name="Id" cs:ColumnName="FromColumnId"/>
      </cs:EndProperty>
      <cs:EndProperty cs:Name="RelationshipColumnMap">
        <cs:ScalarProperty cs:Name="Id" cs:ColumnName="Id"/>
      </cs:EndProperty>
    </cs:AssociationSetMapping>

    <cs:AssociationSetMapping cs:Name="ToColumnRelationshipColumnMaps" cs:TableName="SRelationshipColumnMaps" cs:TypeName="Provider.ToColumnRelationshipColumnMap">
      <cs:EndProperty cs:Name="Column">
        <cs:ScalarProperty cs:Name="Id" cs:ColumnName="ToColumnId"/>
      </cs:EndProperty>
      <cs:EndProperty cs:Name="RelationshipColumnMap">
        <cs:ScalarProperty cs:Name="Id" cs:ColumnName="Id"/>
      </cs:EndProperty>
    </cs:AssociationSetMapping>

    <cs:AssociationSetMapping cs:Name="TableColumns" cs:TableName="SColumns" cs:TypeName="Provider.TableColumn">
      <cs:EndProperty cs:Name="Table">
        <cs:ScalarProperty cs:Name="Id" cs:ColumnName="TableId"/>
      </cs:EndProperty>
      <cs:EndProperty cs:Name="Column">
        <cs:ScalarProperty cs:Name="Id" cs:ColumnName="Id"/>
      </cs:EndProperty>
    </cs:AssociationSetMapping>
  </cs:EntityContainerMapping>
</Mapping>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to