コード例 #1
0
        // Creates table.
        public static TableSnapshot <CircuitSymbolData> CreateTable(StoreSnapshot store)
        {
            TableSnapshot <CircuitSymbolData> table = new TableSnapshot <CircuitSymbolData>(store, "CircuitSymbol", CircuitSymbolData.fields);

            // Create all but foreign keys of the table
            table.MakeUnique("PK_CircuitSymbol", CircuitSymbolData.CircuitSymbolIdField.Field, true);
            table.CreateIndex("IX_Circuit_CircuitSymbol", CircuitSymbolData.CircuitIdField.Field);
            table.CreateIndex("IX_LogicalCircuit_CircuitSymbol", CircuitSymbolData.LogicalCircuitIdField.Field);
            // Return created table
            return(table);
        }
コード例 #2
0
        // Creates table.
        public static TableSnapshot <DevicePinData> CreateTable(StoreSnapshot store)
        {
            TableSnapshot <DevicePinData> table = new TableSnapshot <DevicePinData>(store, "DevicePin", DevicePinData.fields);

            // Create all but foreign keys of the table
            table.MakeUnique("PK_DevicePin", DevicePinData.PinIdField.Field, true);
            table.MakeUnique("AK_DevicePinName", DevicePinData.CircuitIdField.Field, DevicePinData.NameField.Field);
            table.CreateIndex("IX_Circuit_DevicePin", DevicePinData.CircuitIdField.Field);
            // Return created table
            return(table);
        }