Full Code of FirebirdSQL/NETProvider for AI

master a61996cb5734 cached
647 files
3.5 MB
946.2k tokens
1 requests
Download .txt
Showing preview only (3,781K chars total). Download the full file or copy to clipboard to get everything.
Repository: FirebirdSQL/NETProvider
Branch: master
Commit: a61996cb5734
Files: 647
Total size: 3.5 MB

Directory structure:
gitextract_qhgfmhye/

├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       └── ci.yml
├── .gitignore
├── CONTRIBUTING.md
├── README.md
├── build.ps1
├── docs/
│   ├── ado-net-schema.md
│   ├── ado-net.md
│   ├── batching.md
│   ├── decfloat.md
│   ├── entity-framework-6.md
│   ├── entity-framework-core.md
│   ├── events.md
│   ├── int128.md
│   ├── services-backup.md
│   └── time-zones.md
├── header.ps1
├── include.ps1
├── license.txt
├── src/
│   ├── .editorconfig
│   ├── Directory.Build.props
│   ├── EntityFramework.Firebird/
│   │   ├── App.config.install.xdt
│   │   ├── DefaultFbMigrationSqlGeneratorBehavior.cs
│   │   ├── EntityFramework.Firebird.csproj
│   │   ├── FbConnectionFactory.cs
│   │   ├── FbMigrationSqlGenerator.cs
│   │   ├── FbMigrationsTransactionsInterceptor.cs
│   │   ├── FbProviderManifest.cs
│   │   ├── FbProviderServices.cs
│   │   ├── IFbMigrationSqlGeneratorBehavior.cs
│   │   ├── MetadataHelpers.cs
│   │   ├── Properties/
│   │   │   └── EntityFramework.Firebird.snk
│   │   ├── Resources/
│   │   │   ├── ProviderManifest.xml
│   │   │   ├── StoreSchemaDefinition.ssdl
│   │   │   ├── StoreSchemaDefinitionVersion3.ssdl
│   │   │   ├── StoreSchemaMapping.msl
│   │   │   └── StoreSchemaMappingVersion3.msl
│   │   ├── SqlGen/
│   │   │   ├── DmlSqlGenerator.cs
│   │   │   ├── ExpressionTranslator.cs
│   │   │   ├── FirstClause.cs
│   │   │   ├── ISqlFragment.cs
│   │   │   ├── JoinSymbol.cs
│   │   │   ├── SkipClause.cs
│   │   │   ├── SqlBuilder.cs
│   │   │   ├── SqlGenerator.cs
│   │   │   ├── SqlSelectStatement.cs
│   │   │   ├── SqlWriter.cs
│   │   │   ├── Symbol.cs
│   │   │   ├── SymbolPair.cs
│   │   │   └── SymbolTable.cs
│   │   ├── SsdlToFb.cs
│   │   ├── TypeHelpers.cs
│   │   └── Web.config.install.xdt
│   ├── EntityFramework.Firebird.Tests/
│   │   ├── EntityFramework.Firebird.Tests.csproj
│   │   ├── EntityFrameworkTestsBase.cs
│   │   ├── FbTestDbContext.cs
│   │   ├── InfrastructureTests.cs
│   │   ├── QueryTests.cs
│   │   └── app.config
│   ├── FirebirdSql.Data.External/
│   │   ├── FirebirdSql.Data.External.projitems
│   │   ├── FirebirdSql.Data.External.shproj
│   │   ├── RC4/
│   │   │   ├── ICipherParameters.cs
│   │   │   ├── KeyParameter.cs
│   │   │   └── RC4Engine.cs
│   │   └── zlib/
│   │       ├── Deflate.cs
│   │       ├── InfTree.cs
│   │       ├── Inflate.cs
│   │       ├── Tree.cs
│   │       ├── Zlib.cs
│   │       ├── ZlibCodec.cs
│   │       └── ZlibConstants.cs
│   ├── FirebirdSql.Data.FirebirdClient/
│   │   ├── Client/
│   │   │   ├── ClientFactory.cs
│   │   │   ├── Managed/
│   │   │   │   ├── AuthBlock.cs
│   │   │   │   ├── DataProviderStreamWrapper.cs
│   │   │   │   ├── FetchResponse.cs
│   │   │   │   ├── FirebirdNetworkHandlingWrapper.cs
│   │   │   │   ├── GdsConnection.cs
│   │   │   │   ├── GenericResponse.cs
│   │   │   │   ├── IDataProvider.cs
│   │   │   │   ├── IResponse.cs
│   │   │   │   ├── ITracksIOFailure.cs
│   │   │   │   ├── IXdrReader.cs
│   │   │   │   ├── IXdrWriter.cs
│   │   │   │   ├── ProtocolsSupported.cs
│   │   │   │   ├── SqlResponse.cs
│   │   │   │   ├── Srp/
│   │   │   │   │   ├── Srp256Client.cs
│   │   │   │   │   ├── SrpClient.cs
│   │   │   │   │   └── SrpClientBase.cs
│   │   │   │   ├── Sspi/
│   │   │   │   │   └── SspiHelper.cs
│   │   │   │   ├── Version10/
│   │   │   │   │   ├── GdsArray.cs
│   │   │   │   │   ├── GdsBlob.cs
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsEventManager.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   ├── GdsStatement.cs
│   │   │   │   │   └── GdsTransaction.cs
│   │   │   │   ├── Version11/
│   │   │   │   │   ├── AuthResponse.cs
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   └── GdsStatement.cs
│   │   │   │   ├── Version12/
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   └── GdsStatement.cs
│   │   │   │   ├── Version13/
│   │   │   │   │   ├── ContAuthResponse.cs
│   │   │   │   │   ├── CryptKeyCallbackResponse.cs
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   ├── GdsStatement.cs
│   │   │   │   │   └── WireCryptOption.cs
│   │   │   │   ├── Version15/
│   │   │   │   │   ├── CryptKeyCallbackResponse.cs
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   └── GdsStatement.cs
│   │   │   │   ├── Version16/
│   │   │   │   │   ├── BatchCompletionStateResponse.cs
│   │   │   │   │   ├── GdsBatch.cs
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   └── GdsStatement.cs
│   │   │   │   └── XdrReaderWriter.cs
│   │   │   └── Native/
│   │   │       ├── FbClientFactory.cs
│   │   │       ├── FesArray.cs
│   │   │       ├── FesBlob.cs
│   │   │       ├── FesConnection.cs
│   │   │       ├── FesDatabase.cs
│   │   │       ├── FesServiceManager.cs
│   │   │       ├── FesStatement.cs
│   │   │       ├── FesTransaction.cs
│   │   │       ├── Handles/
│   │   │       │   ├── BlobHandle.cs
│   │   │       │   ├── DatabaseHandle.cs
│   │   │       │   ├── FirebirdHandle.cs
│   │   │       │   ├── IFirebirdHandle.cs
│   │   │       │   ├── StatementHandle.cs
│   │   │       │   └── TransactionHandle.cs
│   │   │       ├── IFbClient.cs
│   │   │       ├── Marshalers/
│   │   │       │   ├── ArrayBoundMarshal.cs
│   │   │       │   ├── ArrayDescMarshal.cs
│   │   │       │   ├── ArrayDescMarshaler.cs
│   │   │       │   ├── XSQLDA.cs
│   │   │       │   ├── XSQLVAR.cs
│   │   │       │   └── XsqldaMarshaler.cs
│   │   │       └── StatusVectorHelper.cs
│   │   ├── Common/
│   │   │   ├── ArrayBase.cs
│   │   │   ├── ArrayBound.cs
│   │   │   ├── ArrayDesc.cs
│   │   │   ├── BatchBase.cs
│   │   │   ├── BatchParameterBuffer.cs
│   │   │   ├── BinaryEncoding.cs
│   │   │   ├── BlobBase.cs
│   │   │   ├── BlobParameterBuffer.cs
│   │   │   ├── BlobStream.cs
│   │   │   ├── Charset.cs
│   │   │   ├── ConnectionPoolLifetimeHelper.cs
│   │   │   ├── ConnectionString.cs
│   │   │   ├── DatabaseBase.cs
│   │   │   ├── DatabaseParameterBuffer1.cs
│   │   │   ├── DatabaseParameterBuffer2.cs
│   │   │   ├── DatabaseParameterBufferBase.cs
│   │   │   ├── DbDataType.cs
│   │   │   ├── DbField.cs
│   │   │   ├── DbStatementType.cs
│   │   │   ├── DbValue.cs
│   │   │   ├── DecimalCodec.cs
│   │   │   ├── DecimalShiftHelper.cs
│   │   │   ├── DecimalType.cs
│   │   │   ├── DenselyPackedDecimalCodec.cs
│   │   │   ├── Descriptor.cs
│   │   │   ├── EmptyDescriptorFiller.cs
│   │   │   ├── EventParameterBuffer.cs
│   │   │   ├── ExplicitCancellation.cs
│   │   │   ├── Extensions.cs
│   │   │   ├── IDescriptorFiller.cs
│   │   │   ├── InfoValuesConverter.cs
│   │   │   ├── Int128Helper.cs
│   │   │   ├── IscCodes.cs
│   │   │   ├── IscError.cs
│   │   │   ├── IscErrorMessages.cs
│   │   │   ├── IscException.cs
│   │   │   ├── IscHelper.cs
│   │   │   ├── NamedParametersParser.cs
│   │   │   ├── NativeHelpers.cs
│   │   │   ├── ParameterBuffer.cs
│   │   │   ├── RemoteEvent.cs
│   │   │   ├── ServiceManagerBase.cs
│   │   │   ├── ServiceParameterBuffer2.cs
│   │   │   ├── ServiceParameterBuffer3.cs
│   │   │   ├── ServiceParameterBufferBase.cs
│   │   │   ├── ShutdownHelper.cs
│   │   │   ├── SizeHelper.cs
│   │   │   ├── SqlStateMapping.cs
│   │   │   ├── StatementBase.cs
│   │   │   ├── StatementState.cs
│   │   │   ├── TimeZoneMapping.cs
│   │   │   ├── TransactionBase.cs
│   │   │   ├── TransactionParameterBuffer.cs
│   │   │   ├── TransactionState.cs
│   │   │   ├── TypeDecoder.cs
│   │   │   ├── TypeEncoder.cs
│   │   │   └── TypeHelper.cs
│   │   ├── FirebirdClient/
│   │   │   ├── FbBatchCommand.cs
│   │   │   ├── FbBatchNonQueryResult.cs
│   │   │   ├── FbBatchParameterCollection.cs
│   │   │   ├── FbCharset.cs
│   │   │   ├── FbCommand.cs
│   │   │   ├── FbCommandBuilder.cs
│   │   │   ├── FbConnection.cs
│   │   │   ├── FbConnectionInternal.cs
│   │   │   ├── FbConnectionPoolManager.cs
│   │   │   ├── FbConnectionStringBuilder.cs
│   │   │   ├── FbDataAdapter.cs
│   │   │   ├── FbDataReader.cs
│   │   │   ├── FbDatabaseInfo.cs
│   │   │   ├── FbDbType.cs
│   │   │   ├── FbEnlistmentNotification.cs
│   │   │   ├── FbError.cs
│   │   │   ├── FbErrorCollection.cs
│   │   │   ├── FbException.cs
│   │   │   ├── FbInfoMessageEventArgs.cs
│   │   │   ├── FbParameter.cs
│   │   │   ├── FbParameterCollection.cs
│   │   │   ├── FbRemoteEvent.cs
│   │   │   ├── FbRemoteEventCountsEventArgs.cs
│   │   │   ├── FbRemoteEventErrorEventArgs.cs
│   │   │   ├── FbRowUpdatedEventArgs.cs
│   │   │   ├── FbRowUpdatingEventArgs.cs
│   │   │   ├── FbServerType.cs
│   │   │   ├── FbTransaction.cs
│   │   │   ├── FbTransactionBehavior.cs
│   │   │   ├── FbTransactionInfo.cs
│   │   │   ├── FbTransactionOptions.cs
│   │   │   ├── FbWireCrypt.cs
│   │   │   ├── FirebirdClientFactory.cs
│   │   │   └── IFbPreparedCommand.cs
│   │   ├── FirebirdSql.Data.FirebirdClient.csproj
│   │   ├── Isql/
│   │   │   ├── CommandExecutedEventArgs.cs
│   │   │   ├── CommandExecutingEventArgs.cs
│   │   │   ├── FbBatchExecution.cs
│   │   │   ├── FbScript.cs
│   │   │   ├── FbStatement.cs
│   │   │   ├── FbStatementCollection.cs
│   │   │   ├── SqlStatementType.cs
│   │   │   ├── SqlStringParser.cs
│   │   │   └── UnknownStatementEventArgs.cs
│   │   ├── Logging/
│   │   │   ├── FbLogManager.cs
│   │   │   └── LogMessages.cs
│   │   ├── Properties/
│   │   │   ├── ComAssemblyInfo.cs
│   │   │   ├── FirebirdSql.Data.FirebirdClient.snk
│   │   │   └── InternalsVisibleToAssemblyInfo.cs
│   │   ├── Schema/
│   │   │   ├── FbCharacterSets.cs
│   │   │   ├── FbCheckConstraints.cs
│   │   │   ├── FbChecksByTable.cs
│   │   │   ├── FbCollations.cs
│   │   │   ├── FbColumnPrivileges.cs
│   │   │   ├── FbColumns.cs
│   │   │   ├── FbDomains.cs
│   │   │   ├── FbForeignKeyColumns.cs
│   │   │   ├── FbForeignKeys.cs
│   │   │   ├── FbFunctionArguments.cs
│   │   │   ├── FbFunctionPrivileges.cs
│   │   │   ├── FbFunctions.cs
│   │   │   ├── FbGenerators.cs
│   │   │   ├── FbIndexColumns.cs
│   │   │   ├── FbIndexes.cs
│   │   │   ├── FbMetaData.xml
│   │   │   ├── FbPrimaryKeys.cs
│   │   │   ├── FbProcedureParameters.cs
│   │   │   ├── FbProcedurePrivileges.cs
│   │   │   ├── FbProcedures.cs
│   │   │   ├── FbRoles.cs
│   │   │   ├── FbSchema.cs
│   │   │   ├── FbSchemaFactory.cs
│   │   │   ├── FbTableConstraints.cs
│   │   │   ├── FbTablePrivileges.cs
│   │   │   ├── FbTables.cs
│   │   │   ├── FbTriggers.cs
│   │   │   ├── FbUniqueKeys.cs
│   │   │   ├── FbViewColumns.cs
│   │   │   ├── FbViewPrivileges.cs
│   │   │   └── FbViews.cs
│   │   ├── Services/
│   │   │   ├── FbBackup.cs
│   │   │   ├── FbBackupFile.cs
│   │   │   ├── FbBackupFileCollection.cs
│   │   │   ├── FbBackupFlags.cs
│   │   │   ├── FbBackupRestoreStatistics.cs
│   │   │   ├── FbConfiguration.cs
│   │   │   ├── FbDatabaseTraceConfiguration.cs
│   │   │   ├── FbDatabaseTraceConfigurationCollection.cs
│   │   │   ├── FbDatabaseTraceEvents.cs
│   │   │   ├── FbDatabasesInfo.cs
│   │   │   ├── FbLog.cs
│   │   │   ├── FbNBackup.cs
│   │   │   ├── FbNBackupFlags.cs
│   │   │   ├── FbNFixup.cs
│   │   │   ├── FbNRestore.cs
│   │   │   ├── FbRestore.cs
│   │   │   ├── FbRestoreFlags.cs
│   │   │   ├── FbSecurity.cs
│   │   │   ├── FbServerConfig.cs
│   │   │   ├── FbServerProperties.cs
│   │   │   ├── FbService.cs
│   │   │   ├── FbServiceState.cs
│   │   │   ├── FbServiceTraceConfiguration.cs
│   │   │   ├── FbServiceTraceEvents.cs
│   │   │   ├── FbShutdownMode.cs
│   │   │   ├── FbShutdownOnlineMode.cs
│   │   │   ├── FbShutdownType.cs
│   │   │   ├── FbStatistical.cs
│   │   │   ├── FbStatisticalFlags.cs
│   │   │   ├── FbStreamingBackup.cs
│   │   │   ├── FbStreamingRestore.cs
│   │   │   ├── FbTrace.cs
│   │   │   ├── FbTraceConfiguration.cs
│   │   │   ├── FbTraceVersion.cs
│   │   │   ├── FbUserData.cs
│   │   │   ├── FbValidation.cs
│   │   │   ├── FbValidation2.cs
│   │   │   ├── FbValidationFlags.cs
│   │   │   └── ServiceOutputEventArgs.cs
│   │   └── Types/
│   │       ├── FbDecFloat.cs
│   │       ├── FbZonedDateTime.cs
│   │       └── FbZonedTime.cs
│   ├── FirebirdSql.Data.FirebirdClient.Tests/
│   │   ├── AuthBlockTests.cs
│   │   ├── BlobStreamTests.cs
│   │   ├── ConnectionPoolLifetimeHelperTests.cs
│   │   ├── ConnectionStringTests.cs
│   │   ├── FbArrayTests.cs
│   │   ├── FbBatchCommandTests.cs
│   │   ├── FbBlobTests.cs
│   │   ├── FbBooleanSupportTests.cs
│   │   ├── FbCommandBuilderTests.cs
│   │   ├── FbCommandTests.cs
│   │   ├── FbConnectionStringBuilderTests.cs
│   │   ├── FbConnectionTests.cs
│   │   ├── FbDataAdapterTests.cs
│   │   ├── FbDataReaderTests.cs
│   │   ├── FbDatabaseInfoTests.cs
│   │   ├── FbDecFloat16SupportTests.cs
│   │   ├── FbDecFloat34SupportTests.cs
│   │   ├── FbDecFloatTypeTests.cs
│   │   ├── FbExceptionTests.cs
│   │   ├── FbImplicitTransactionTests.cs
│   │   ├── FbInt128SupportTests.cs
│   │   ├── FbLongNumericsSupportTests.cs
│   │   ├── FbParameterCollectionTests.cs
│   │   ├── FbParameterTests.cs
│   │   ├── FbRemoteEventTests.cs
│   │   ├── FbSchemaTests.cs
│   │   ├── FbScriptTests.cs
│   │   ├── FbServicesTests.cs
│   │   ├── FbStoredProcedureCallsTests.cs
│   │   ├── FbTimeZonesSupportTests.cs
│   │   ├── FbTransactionInfoTests.cs
│   │   ├── FbTransactionTests.cs
│   │   ├── FbZonedDateTimeTypeTests.cs
│   │   ├── FbZonedTimeTypeTests.cs
│   │   ├── FirebirdSql.Data.FirebirdClient.Tests.csproj
│   │   ├── GuidTests.cs
│   │   ├── Srp256ClientTests.cs
│   │   ├── SrpClientTests.cs
│   │   ├── TrackerIssuesTests.cs
│   │   └── TransactionScopeTests.cs
│   ├── FirebirdSql.Data.TestsBase/
│   │   ├── FbServerTypeTestFixtureSource.cs
│   │   ├── FbTestsBase.cs
│   │   ├── FbTestsSetup.cs
│   │   ├── FirebirdSql.Data.TestsBase.projitems
│   │   ├── FirebirdSql.Data.TestsBase.shproj
│   │   ├── FirebirdSql.Data.TestsBase.snk
│   │   ├── NoServerCategoryAttribute.cs
│   │   └── Program.cs
│   ├── FirebirdSql.EntityFrameworkCore.Firebird/
│   │   ├── Design/
│   │   │   └── Internal/
│   │   │       └── FbDesignTimeServices.cs
│   │   ├── Diagnostics/
│   │   │   └── Internal/
│   │   │       └── FbLoggingDefinitions.cs
│   │   ├── Extensions/
│   │   │   ├── FbDatabaseFacadeExtensions.cs
│   │   │   ├── FbDbContextOptionsBuilderExtensions.cs
│   │   │   ├── FbModelBuilderExtensions.cs
│   │   │   ├── FbModelExtensions.cs
│   │   │   ├── FbPropertyBuilderExtensions.cs
│   │   │   ├── FbPropertyExtensions.cs
│   │   │   └── FbServiceCollectionExtensions.cs
│   │   ├── FirebirdSql.EntityFrameworkCore.Firebird.csproj
│   │   ├── Infrastructure/
│   │   │   ├── FbDbContextOptionsBuilder.cs
│   │   │   └── Internal/
│   │   │       ├── FbModelValidator.cs
│   │   │       ├── FbOptionsExtension.cs
│   │   │       └── IFbOptions.cs
│   │   ├── Internal/
│   │   │   └── FbOptions.cs
│   │   ├── Metadata/
│   │   │   ├── Conventions/
│   │   │   │   ├── FbConventionSetBuilder.cs
│   │   │   │   ├── FbStoreGenerationConvention.cs
│   │   │   │   ├── FbValueGenerationConvention.cs
│   │   │   │   └── FbValueGenerationStrategyConvention.cs
│   │   │   ├── FbIdentityType.cs
│   │   │   ├── FbValueGenerationStrategy.cs
│   │   │   └── Internal/
│   │   │       ├── FbAnnotationNames.cs
│   │   │       └── FbRelationalAnnotationProvider.cs
│   │   ├── Migrations/
│   │   │   ├── FbMigrationSqlGeneratorBehavior.cs
│   │   │   ├── FbMigrationsSqlGenerator.cs
│   │   │   ├── IFbMigrationSqlGeneratorBehavior.cs
│   │   │   └── Internal/
│   │   │       ├── FbHistoryRepository.cs
│   │   │       └── FbMigrationDatabaseLock.cs
│   │   ├── Properties/
│   │   │   ├── EntityFrameworkCoreAssemblyInfo.cs
│   │   │   └── FirebirdSql.EntityFrameworkCore.Firebird.snk
│   │   ├── Query/
│   │   │   ├── ExpressionTranslators/
│   │   │   │   └── Internal/
│   │   │   │       ├── FbByteArrayMethodTranslator.cs
│   │   │   │       ├── FbConvertTranslator.cs
│   │   │   │       ├── FbDateAddTranslator.cs
│   │   │   │       ├── FbDateOnlyMethodTranslator.cs
│   │   │   │       ├── FbDateOnlyPartComponentTranslator.cs
│   │   │   │       ├── FbDateTimeDateComponentTranslator.cs
│   │   │   │       ├── FbDateTimeNowTodayTranslator.cs
│   │   │   │       ├── FbDateTimePartComponentTranslator.cs
│   │   │   │       ├── FbMathTranslator.cs
│   │   │   │       ├── FbMemberTranslatorProvider.cs
│   │   │   │       ├── FbMethodCallTranslatorProvider.cs
│   │   │   │       ├── FbNewGuidTranslator.cs
│   │   │   │       ├── FbObjectToStringTranslator.cs
│   │   │   │       ├── FbStringContainsTranslator.cs
│   │   │   │       ├── FbStringEndsWithTranslator.cs
│   │   │   │       ├── FbStringFirstOrDefaultTranslator.cs
│   │   │   │       ├── FbStringIndexOfTranslator.cs
│   │   │   │       ├── FbStringIsNullOrWhiteSpaceTranslator.cs
│   │   │   │       ├── FbStringLastOrDefaultTranslator.cs
│   │   │   │       ├── FbStringLengthTranslator.cs
│   │   │   │       ├── FbStringReplaceTranslator.cs
│   │   │   │       ├── FbStringStartsWithTranslator.cs
│   │   │   │       ├── FbStringSubstringTranslator.cs
│   │   │   │       ├── FbStringToLowerTranslator.cs
│   │   │   │       ├── FbStringToUpperTranslator.cs
│   │   │   │       ├── FbStringTrimTranslator.cs
│   │   │   │       ├── FbTimeOnlyMethodTranslator.cs
│   │   │   │       ├── FbTimeOnlyPartComponentTranslator.cs
│   │   │   │       └── FbTimeSpanPartComponentTranslator.cs
│   │   │   ├── Expressions/
│   │   │   │   └── Internal/
│   │   │   │       └── FbSpacedFunctionExpression.cs
│   │   │   └── Internal/
│   │   │       ├── FbQueryRootProcessor.cs
│   │   │       ├── FbQuerySqlGenerator.cs
│   │   │       ├── FbQuerySqlGeneratorFactory.cs
│   │   │       ├── FbQueryTranslationPreprocessor.cs
│   │   │       ├── FbQueryTranslationPreprocessorFactory.cs
│   │   │       ├── FbSqlExpressionFactory.cs
│   │   │       ├── FbSqlTranslatingExpressionVisitor.cs
│   │   │       └── FbSqlTranslatingExpressionVisitorFactory.cs
│   │   ├── Scaffolding/
│   │   │   └── Internal/
│   │   │       ├── FbDatabaseModelFactory.cs
│   │   │       └── FbProviderCodeGenerator.cs
│   │   ├── Storage/
│   │   │   └── Internal/
│   │   │       ├── FbBoolTypeMapping.cs
│   │   │       ├── FbByteArrayTypeMapping.cs
│   │   │       ├── FbDatabaseCreator.cs
│   │   │       ├── FbDateOnlyTypeMapping.cs
│   │   │       ├── FbDateTimeTypeMapping.cs
│   │   │       ├── FbGuidTypeMapping.cs
│   │   │       ├── FbRelationalConnection.cs
│   │   │       ├── FbRelationalTransaction.cs
│   │   │       ├── FbSqlGenerationHelper.cs
│   │   │       ├── FbStringTypeMapping.cs
│   │   │       ├── FbTimeOnlyTypeMapping.cs
│   │   │       ├── FbTimeSpanTypeMapping.cs
│   │   │       ├── FbTransactionFactory.cs
│   │   │       ├── FbTypeMappingSource.cs
│   │   │       ├── IFbSqlGenerationHelper.cs
│   │   │       ├── IRelationalFbConnection.cs
│   │   │       └── IRelationalFbTransaction.cs
│   │   ├── Update/
│   │   │   └── Internal/
│   │   │       ├── FbModificationCommandBatchFactory.cs
│   │   │       ├── FbUpdateSqlGenerator.cs
│   │   │       └── IFbUpdateSqlGenerator.cs
│   │   ├── Utilities/
│   │   │   ├── EnumerableMethods.cs
│   │   │   ├── SharedTypeExtensions.cs
│   │   │   ├── StringBuilderExtensions.cs
│   │   │   └── TranslatorsHelper.cs
│   │   └── ValueGeneration/
│   │       └── Internal/
│   │           ├── FbSequenceHiLoValueGenerator.cs
│   │           ├── FbSequenceValueGeneratorFactory.cs
│   │           ├── FbSequenceValueGeneratorState.cs
│   │           ├── FbValueGeneratorCache.cs
│   │           ├── FbValueGeneratorSelector.cs
│   │           ├── IFbSequenceValueGeneratorFactory.cs
│   │           └── IFbValueGeneratorCache.cs
│   ├── FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/
│   │   ├── ComplianceFbTest.cs
│   │   ├── FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj
│   │   ├── Helpers/
│   │   │   ├── ModelHelpers.cs
│   │   │   ├── SkippingAttributes.cs
│   │   │   └── Xunit.cs
│   │   ├── MigrationsFbTest.cs
│   │   ├── Query/
│   │   │   ├── AdHocAdvancedMappingsQueryFbTest.cs
│   │   │   ├── AdHocComplexTypeQueryFbTest.cs
│   │   │   ├── AdHocManyToManyQueryFbTest.cs
│   │   │   ├── AdHocMiscellaneousQueryFbTest.cs
│   │   │   ├── AdHocNavigationsQueryFbTest.cs
│   │   │   ├── AdHocQueryFiltersQueryFbTest.cs
│   │   │   ├── AdHocQuerySplittingQueryFbTest.cs
│   │   │   ├── Associations/
│   │   │   │   ├── ComplexTableSplitting/
│   │   │   │   │   ├── ComplexTableSplittingBulkUpdateFbTest.cs
│   │   │   │   │   ├── ComplexTableSplittingFbFixture.cs
│   │   │   │   │   ├── ComplexTableSplittingMiscellaneousFbTest.cs
│   │   │   │   │   ├── ComplexTableSplittingProjectionFbTest.cs
│   │   │   │   │   └── ComplexTableSplittingStructuralEqualityFbTest.cs
│   │   │   │   ├── Navigations/
│   │   │   │   │   ├── NavigationsCollectionFbTest.cs
│   │   │   │   │   ├── NavigationsFbFixture.cs
│   │   │   │   │   ├── NavigationsIncludeFbTest.cs
│   │   │   │   │   ├── NavigationsMiscellaneousFbTest.cs
│   │   │   │   │   ├── NavigationsPrimitiveCollectionFbTest.cs
│   │   │   │   │   ├── NavigationsProjectionFbTest.cs
│   │   │   │   │   ├── NavigationsSetOperationsFbTest.cs
│   │   │   │   │   └── NavigationsStructuralEqualityFbTest.cs
│   │   │   │   ├── OwnedNavigations/
│   │   │   │   │   ├── OwnedNavigationsCollectionFbTest.cs
│   │   │   │   │   ├── OwnedNavigationsFbFixture.cs
│   │   │   │   │   ├── OwnedNavigationsMiscellaneousFbTest.cs
│   │   │   │   │   ├── OwnedNavigationsProjectionFbTest.cs
│   │   │   │   │   ├── OwnedNavigationsSetOperationsFbTest.cs
│   │   │   │   │   └── OwnedNavigationsStructuralEqualityFbTest.cs
│   │   │   │   └── OwnedTableSplitting/
│   │   │   │       ├── OwnedTableSplittingFbFixture.cs
│   │   │   │       ├── OwnedTableSplittingMiscellaneousFbTest.cs
│   │   │   │       ├── OwnedTableSplittingProjectionFbTest.cs
│   │   │   │       └── OwnedTableSplittingStructuralEqualityFbTest.cs
│   │   │   ├── ComplexNavigationsCollectionsQueryFbTest.cs
│   │   │   ├── ComplexNavigationsCollectionsSharedTypeQueryFbTest.cs
│   │   │   ├── ComplexNavigationsCollectionsSplitQueryFbTest.cs
│   │   │   ├── ComplexNavigationsCollectionsSplitSharedTypeQueryFbTest.cs
│   │   │   ├── ComplexNavigationsQueryFbFixture.cs
│   │   │   ├── ComplexNavigationsQueryFbTest.cs
│   │   │   ├── ComplexNavigationsSharedTypeQueryFbFixture.cs
│   │   │   ├── ComplexNavigationsSharedTypeQueryFbTest.cs
│   │   │   ├── ComplexTypeQueryFbTest.cs
│   │   │   ├── CompositeKeysQueryFbFixture.cs
│   │   │   ├── CompositeKeysQueryFbTest.cs
│   │   │   ├── CompositeKeysSplitQueryFbTest.cs
│   │   │   ├── Ef6GroupByFbTest.cs
│   │   │   ├── EntitySplittingQueryFbTest.cs
│   │   │   ├── FromSqlQueryFbTest.cs
│   │   │   ├── FromSqlSprocQueryFbTest.cs
│   │   │   ├── FunkyDataQueryFbTest.cs
│   │   │   ├── GearsOfWarFromSqlQueryFbTest.cs
│   │   │   ├── GearsOfWarQueryFbFixture.cs
│   │   │   ├── GearsOfWarQueryFbTest.cs
│   │   │   ├── IncludeOneToOneFbTest.cs
│   │   │   ├── IncompleteMappingInheritanceQueryFbFixture.cs
│   │   │   ├── IncompleteMappingInheritanceQueryFbTest.cs
│   │   │   ├── InheritanceRelationshipsQueryFbTest.cs
│   │   │   ├── ManyToManyNoTrackingQueryFbTest.cs
│   │   │   ├── ManyToManyQueryFbFixture.cs
│   │   │   ├── ManyToManyQueryFbTest.cs
│   │   │   ├── MappingQueryFbTest.cs
│   │   │   ├── NonSharedPrimitiveCollectionsQueryFbTest.cs
│   │   │   ├── NorthwindAggregateOperatorsQueryFbTest.cs
│   │   │   ├── NorthwindAsNoTrackingQueryFbTest.cs
│   │   │   ├── NorthwindAsTrackingQueryFbTest.cs
│   │   │   ├── NorthwindChangeTrackingQueryFbTest.cs
│   │   │   ├── NorthwindCompiledQueryFbTest.cs
│   │   │   ├── NorthwindDbFunctionsQueryFbTest.cs
│   │   │   ├── NorthwindEFPropertyIncludeQueryFbTest.cs
│   │   │   ├── NorthwindFunctionsQueryFbTest.cs
│   │   │   ├── NorthwindGroupByQueryFbTest.cs
│   │   │   ├── NorthwindIncludeNoTrackingQueryFbTest.cs
│   │   │   ├── NorthwindIncludeQueryFbTest.cs
│   │   │   ├── NorthwindJoinQueryFbTest.cs
│   │   │   ├── NorthwindKeylessEntitiesQueryFbTest.cs
│   │   │   ├── NorthwindMiscellaneousQueryFbTest.cs
│   │   │   ├── NorthwindNavigationsQueryFbTest.cs
│   │   │   ├── NorthwindQueryFbFixture.cs
│   │   │   ├── NorthwindQueryFiltersQueryFbTest.cs
│   │   │   ├── NorthwindQueryTaggingQueryFbTest.cs
│   │   │   ├── NorthwindSelectQueryFbTest.cs
│   │   │   ├── NorthwindSetOperationsQueryFbTest.cs
│   │   │   ├── NorthwindSplitIncludeNoTrackingQueryFbTest.cs
│   │   │   ├── NorthwindSplitIncludeQueryFbTest.cs
│   │   │   ├── NorthwindSqlQueryFbTest.cs
│   │   │   ├── NorthwindStringIncludeQueryFbTest.cs
│   │   │   ├── NorthwindWhereQueryFbTest.cs
│   │   │   ├── NullKeysFbTest.cs
│   │   │   ├── NullSemanticsQueryFbFixture.cs
│   │   │   ├── NullSemanticsQueryFbTest.cs
│   │   │   ├── OperatorsProceduralFbTest.cs
│   │   │   ├── OperatorsQueryFbTest.cs
│   │   │   ├── OptionalDependentQueryFbFixture.cs
│   │   │   ├── OptionalDependentQueryFbTest.cs
│   │   │   ├── OwnedEntityQueryFbTest.cs
│   │   │   ├── OwnedQueryFbTest.cs
│   │   │   ├── PrimitiveCollectionsQueryFbTest.cs
│   │   │   ├── QueryFilterFuncletizationFbTest.cs
│   │   │   ├── QueryNoClientEvalFbTest.cs
│   │   │   ├── SharedTypeQueryFbTest.cs
│   │   │   ├── SqlExecutorFbTest.cs
│   │   │   ├── SqlQueryFbTest.cs
│   │   │   ├── TPCFiltersInheritanceQueryFbFixture.cs
│   │   │   ├── TPCFiltersInheritanceQueryFbTest.cs
│   │   │   ├── TPCGearsOfWarQueryFbFixture.cs
│   │   │   ├── TPCGearsOfWarQueryFbTest.cs
│   │   │   ├── TPCInheritanceQueryFbFixture.cs
│   │   │   ├── TPCInheritanceQueryFbFixtureBase.cs
│   │   │   ├── TPCInheritanceQueryFbTest.cs
│   │   │   ├── TPCInheritanceQueryFbTestBase.cs
│   │   │   ├── TPCInheritanceQueryHiLoFbFixture.cs
│   │   │   ├── TPCInheritanceQueryHiLoFbTest.cs
│   │   │   ├── TPCManyToManyNoTrackingQueryFbTest.cs
│   │   │   ├── TPCManyToManyQueryFbFixture.cs
│   │   │   ├── TPCManyToManyQueryFbTest.cs
│   │   │   ├── TPCRelationshipsQueryFbTest.cs
│   │   │   ├── TPHFiltersInheritanceQueryFbFixture.cs
│   │   │   ├── TPHFiltersInheritanceQueryFbTest.cs
│   │   │   ├── TPHInheritanceQueryFbFixture.cs
│   │   │   ├── TPHInheritanceQueryFbTest.cs
│   │   │   ├── TPTFiltersInheritanceQueryFbFixture.cs
│   │   │   ├── TPTFiltersInheritanceQueryFbTest.cs
│   │   │   ├── TPTGearsOfWarQueryFbFixture.cs
│   │   │   ├── TPTGearsOfWarQueryFbTest.cs
│   │   │   ├── TPTInheritanceQueryFbFixture.cs
│   │   │   ├── TPTInheritanceQueryFbTest.cs
│   │   │   ├── TPTManyToManyNoTrackingQueryFbTest.cs
│   │   │   ├── TPTManyToManyQueryFbFixture.cs
│   │   │   ├── TPTManyToManyQueryFbTest.cs
│   │   │   ├── TPTRelationshipsQueryFbTest.cs
│   │   │   ├── ToSqlQueryFbTest.cs
│   │   │   ├── Translations/
│   │   │   │   ├── BasicTypesQueryFbFixture.cs
│   │   │   │   ├── ByteArrayTranslationsFbTest.cs
│   │   │   │   ├── EnumTranslationsFbTest.cs
│   │   │   │   ├── GuidTranslationsFbTest.cs
│   │   │   │   ├── MathTranslationsFbTest.cs
│   │   │   │   ├── MiscellaneousTranslationsFbTest.cs
│   │   │   │   ├── Operators/
│   │   │   │   │   ├── ArithmeticOperatorTranslationsFbTest.cs
│   │   │   │   │   ├── BitwiseOperatorTranslationsFbTest.cs
│   │   │   │   │   ├── ComparisonOperatorTranslationsFbTest.cs
│   │   │   │   │   ├── LogicalOperatorTranslationsFbTest.cs
│   │   │   │   │   └── MiscellaneousOperatorTranslationsFbTest.cs
│   │   │   │   ├── StringTranslationsFbTest.cs
│   │   │   │   └── Temporal/
│   │   │   │       ├── DateOnlyTranslationsFbTest.cs
│   │   │   │       ├── DateTimeOffsetTranslationsFbTest.cs
│   │   │   │       ├── DateTimeTranslationsFbTest.cs
│   │   │   │       ├── TimeOnlyTranslationsFbTest.cs
│   │   │   │       └── TimeSpanTranslationsFbTest.cs
│   │   │   ├── UdfDbFunctionFbTests.cs
│   │   │   └── WarningsFbTest.cs
│   │   ├── TestModels/
│   │   │   └── Northwind/
│   │   │       └── NorthwindFbContext.cs
│   │   ├── TestUtilities/
│   │   │   ├── FbPrecompiledQueryTestHelpers.cs
│   │   │   ├── FbTestHelpers.cs
│   │   │   ├── FbTestStore.cs
│   │   │   └── FbTestStoreFactory.cs
│   │   └── UpdatesFbTest.cs
│   ├── FirebirdSql.EntityFrameworkCore.Firebird.Tests/
│   │   ├── EndToEnd/
│   │   │   ├── DeleteTests.cs
│   │   │   ├── InsertTests.cs
│   │   │   └── UpdateTests.cs
│   │   ├── EntityFrameworkCoreTestsBase.cs
│   │   ├── FbTestDbContext.cs
│   │   ├── FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj
│   │   ├── Migrations/
│   │   │   └── MigrationsTests.cs
│   │   ├── Query/
│   │   │   └── ElementaryTests.cs
│   │   └── Scaffolding/
│   │       └── ScaffoldingTests.cs
│   ├── NETProvider.slnx
│   ├── Perf/
│   │   ├── CommandBenchmark.Execute.cs
│   │   ├── CommandBenchmark.Fetch.cs
│   │   ├── CommandBenchmark.cs
│   │   ├── Perf.csproj
│   │   └── Program.cs
│   ├── Scratchpad/
│   │   ├── Program.cs
│   │   └── Scratchpad.csproj
│   └── Versions.props
└── tests.ps1

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/FUNDING.yml
================================================
github: cincuranet
custom: https://firebirdsql.org/en/donate/


================================================
FILE: .github/workflows/ci.yml
================================================
name: CI

on: [push, pull_request]

env:
  CONFIGURATION: Release
  DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

jobs:
  ci:
    runs-on: windows-2025
    strategy:
      fail-fast: false
      matrix:
        FIREBIRD_SELECTION: [FB30, FB40, FB50]
        TEST_SUITE: [Tests-FirebirdClient-Default-Compression-CryptRequired, Tests-FirebirdClient-Default-NoCompression-CryptRequired, Tests-FirebirdClient-Default-Compression-CryptDisabled, Tests-FirebirdClient-Default-NoCompression-CryptDisabled, Tests-FirebirdClient-Embedded, Tests-EFCore, Tests-EFCore-Functional, Tests-EF6]
    timeout-minutes: 120
    steps:
      - name: Checkout
        uses: actions/checkout@v5
        
      - name: .NET 10.0
        uses: actions/setup-dotnet@v5
        with:
          dotnet-version: 10.0.x

      - name: Build
        run: |
          try {
            .\build.ps1 -Configuration ${{ env.CONFIGURATION }}
            exit $LASTEXITCODE
          }
          catch {
            echo $_
            exit 1
          }
        shell: powershell

      - name: Tests
        run: |
          try {
            $env:tests_firebird_dir = 'C:\firebird'

            .\tests.ps1 -Configuration ${{ env.CONFIGURATION }} -FirebirdSelection ${{ matrix.FIREBIRD_SELECTION }} -TestSuite ${{ matrix.TEST_SUITE }}
            exit $LASTEXITCODE
          }
          catch {
            echo $_
            exit 1
          }
        shell: powershell

      - name: Publish Artifacts
        uses: actions/upload-artifact@v4
        with:
          name: 'ci_${{ matrix.TEST_SUITE }}_${{ matrix.FIREBIRD_SELECTION }}_${{ env.CONFIGURATION }}'
          path: '.\\out\\'


================================================
FILE: .gitignore
================================================
*.suo
*.user
*.lock.json
.vs
bin
obj
out/
.idea


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing

Thanks for considering contributing. Here are some items to consider before starting (in no particular order).

* Check [issues](https://github.com/FirebirdSQL/NETProvider/issues) if you want to start on something.
* Before you start working on something announce your intention on the mailing list (or comment on the issue).
* Issue only complete PRs (no WIPs).
* Make sure your PR doesn't contain unneccessary changes (whitespaces, new lines, ...).
* Follow existing code formatting/styling (even for new files).
* Disclose AI usage.
* Make sure you swept all corners (i.e. all build configurations are fine, works with all Firebird version, etc.).
* Make sure your changes merge without conflicts.
* Consider backward compatibility.
* Don't be afraid to ask (i.e. backward compatibility).
* Be prepared to do some changes after your PR is reviewed.
* Consider whether your change is benefit for majority of users (opposite to only a small group).
* All contributions are licensed under [_Initial Developer's Public License_](license.txt).


================================================
FILE: README.md
================================================
# Firebird .NET Data Provider

## Documentation

* [ADO.NET provider](docs/ado-net.md)
* [Entity Framework 6 provider](docs/entity-framework-6.md)
* [Entity Framework Core provider](docs/entity-framework-core.md)
* [Services - Backup](docs/services-backup.md)
* [Events](docs/events.md)
* [ADO.NET - Schema](docs/ado-net-schema.md)
* [Time zones](docs/time-zones.md)
* [DECFLOAT datatype](docs/decfloat.md)
* [INT128 datatype](docs/int128.md)
* [Batching](docs/batching.md)

## Packages

| NuGet | Version | Downloads |
|-------|---------|-----------|
| [FirebirdSql.Data.FirebirdClient](https://www.nuget.org/packages/FirebirdSql.Data.FirebirdClient) | ![FirebirdSql.Data.FirebirdClient](https://img.shields.io/nuget/v/FirebirdSql.Data.FirebirdClient.svg) | ![FirebirdSql.Data.FirebirdClient](https://img.shields.io/nuget/dt/FirebirdSql.Data.FirebirdClient.svg) |
| [EntityFramework.Firebird](https://www.nuget.org/packages/EntityFramework.Firebird) | ![EntityFramework.Firebird](https://img.shields.io/nuget/v/EntityFramework.Firebird.svg) | ![EntityFramework.Firebird](https://img.shields.io/nuget/dt/EntityFramework.Firebird.svg) |
| [FirebirdSql.EntityFrameworkCore.Firebird](https://www.nuget.org/packages/FirebirdSql.EntityFrameworkCore.Firebird) | ![FirebirdSql.EntityFrameworkCore.Firebird](https://img.shields.io/nuget/v/FirebirdSql.EntityFrameworkCore.Firebird.svg) | ![FirebirdSql.EntityFrameworkCore.Firebird](https://img.shields.io/nuget/dt/FirebirdSql.EntityFrameworkCore.Firebird.svg) |

## Resources

* [Downloads](https://github.com/FirebirdSQL/NETProvider/releases)
* [Issue tracker](https://github.com/FirebirdSQL/NETProvider/issues)
* [Development mailing list](https://groups.google.com/forum/#!forum/firebird-net-provider)
* [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/FirebirdSQL/NETProvider)

## Builds

[![GitHub Actions](https://github.com/FirebirdSQL/NETProvider/workflows/CI/badge.svg)](https://github.com/FirebirdSQL/NETProvider/actions)

## Misc

### Notable supporters

* Sean Leyne (Broadview Software)
* SMS-Timing

### 3rd party code

* For zlib compression the provider uses pieces from [DotNetZip](http://dotnetzip.codeplex.com/) library.
* For RC4 encryption the provider uses pieces from [Bouncy Castle](https://www.bouncycastle.org/csharp/index.html) library.


================================================
FILE: build.ps1
================================================
param(
	[Parameter(Mandatory=$True)]$Configuration)

$ErrorActionPreference = 'Stop'

$baseDir = Split-Path -Parent $PSCommandPath

. "$baseDir\include.ps1"

$outDir = "$baseDir\out"
$versionProvider = ''
$versionEFCore = ''
$versionEF6 = ''

function Clean() {
	if (Test-Path $outDir) {
		rm -Force -Recurse $outDir
	}
	mkdir $outDir | Out-Null
}

function Build() {
	dotnet clean "$baseDir\src\NETProvider.slnx" -c $Configuration -v m
	dotnet build "$baseDir\src\NETProvider.slnx" -c $Configuration -p:ContinuousIntegrationBuild=true -v m
}

function Versions() {
	function v($file) {
		return (Get-Item $file).VersionInfo.ProductVersion -replace '(\d+)\.(\d+)\.(\d+)(-[a-z0-9]+)?.*','$1.$2.$3$4'
	}
	$script:versionProvider = v $baseDir\src\FirebirdSql.Data.FirebirdClient\bin\$Configuration\net10.0\FirebirdSql.Data.FirebirdClient.dll
	$script:versionEFCore = v $baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird\bin\$Configuration\net10.0\FirebirdSql.EntityFrameworkCore.Firebird.dll
	$script:versionEF6 = v $baseDir\src\EntityFramework.Firebird\bin\$Configuration\net48\EntityFramework.Firebird.dll
}

function NuGets() {
	cp $baseDir\src\FirebirdSql.Data.FirebirdClient\bin\$Configuration\FirebirdSql.Data.FirebirdClient.$versionProvider.nupkg $outDir
	cp $baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird\bin\$Configuration\FirebirdSql.EntityFrameworkCore.Firebird.$versionEFCore.nupkg $outDir
	cp $baseDir\src\EntityFramework.Firebird\bin\$Configuration\EntityFramework.Firebird.$versionEF6.nupkg $outDir

	cp $baseDir\src\FirebirdSql.Data.FirebirdClient\bin\$Configuration\FirebirdSql.Data.FirebirdClient.$versionProvider.snupkg $outDir
	cp $baseDir\src\FirebirdSql.EntityFrameworkCore.Firebird\bin\$Configuration\FirebirdSql.EntityFrameworkCore.Firebird.$versionEFCore.snupkg $outDir
	cp $baseDir\src\EntityFramework.Firebird\bin\$Configuration\EntityFramework.Firebird.$versionEF6.snupkg $outDir
}

Clean
Build
Versions
NuGets


================================================
FILE: docs/ado-net-schema.md
================================================
# ADO.NET - Schema

### Steps

* Install `FirebirdSql.Data.FirebirdClient` from NuGet.
* Add `using FirebirdSql.Data.FirebirdClient;`.

### Code

```csharp
using (var connection = new FbConnection("database=localhost:demo.fdb;user=sysdba;password=masterkey"))
{
	connection.Open();

	var metadataCollections = connection.GetSchema();
	var dataTypes = connection.GetSchema(DbMetaDataCollectionNames.DataTypes);
	var dataSourceInformation = connection.GetSchema(DbMetaDataCollectionNames.DataSourceInformation);
	var reservedWords = connection.GetSchema(DbMetaDataCollectionNames.ReservedWords);
	var userTables = connection.GetSchema("Tables", new string[] { null, null, null, "TABLE" });
	var systemTables = connection.GetSchema("Tables", new string[] { null, null, null, "SYSTEM TABLE" });
	var tableColumns = connection.GetSchema("Columns", new string[] { null, null, "TableName" });
}
```


================================================
FILE: docs/ado-net.md
================================================
# ADO.NET

### Steps

* Install `FirebirdSql.Data.FirebirdClient` from NuGet.
* Add `using FirebirdSql.Data.FirebirdClient;`.
* Basic classes are `FbConnection`, `FbTransaction`, `FbCommand` and `FbDataReader`.
* Connection string can be built using `FbConnectionStringBuilder`.

### Code

```csharp
using (var connection = new FbConnection("database=localhost:demo.fdb;user=sysdba;password=masterkey"))
{
	connection.Open();
	using (var transaction = connection.BeginTransaction())
	{
		using (var command = new FbCommand("select * from demo", connection, transaction))
		{
			using (var reader = command.ExecuteReader())
			{
				while (reader.Read())
				{
					var values = new object[reader.FieldCount];
					reader.GetValues(values);
					Console.WriteLine(string.Join("|", values));
				}
			}
		}
	}
}
```

### Scripts

```sql
create table demo (id int primary key, foobar varchar(20) character set utf8);
```

```sql
insert into demo values (6, 'FooBar');
```


================================================
FILE: docs/batching.md
================================================
# Batching

Batching is supported for Firebird 4 (and above). The work is handled by `FbBatchCommand` class. It has similar API surface as `FbCommand`. The usage should feel familiar.

### Specifics

Calling the `ExecuteNonQuery`/`ExecuteNonQueryAsync` does not throw an exception, should the exception happen on server while processing the data. Instead the returned `FbBatchNonQueryResult` object should be used to check the status. The `EnsureSuccess` method or `AllSuccess` property can be used for global check. Further enumeration gives detailed information.

Properties `MultiError`, `ReturnRecordsAffected` and `BatchBufferSize` allow for behavior fine-tuning (these represent `TAG_MULTIERROR`, `TAG_RECORD_COUNTS` and `TAG_BUFFER_BYTES_SIZE` in BPB).

When dealing with huge batches of possible unlimited size, it's good to use `ComputeCurrentBatchSize`/`ComputeCurrentBatchSizeAsync` to make sure the batch is not over `BatchBufferSize`. However calling `ComputeCurrentBatchSize`/`ComputeCurrentBatchSizeAsync` is not cheap and should be handled accordingly.    

### Limitations

At the moment batching is not supported for Firebird Embedded. The progress is tracked [here](https://github.com/FirebirdSQL/NETProvider/issues/1022).

Using (real) blobs as values is not supported. Regular `byte[]`, `string`, etc. values and the implicit conversions work just fine. The progress is tracked [here](https://github.com/FirebirdSQL/NETProvider/issues/1038). 

### Examples

Examples can be found in [`FbBatchCommandTests`](../src/FirebirdSql.Data.FirebirdClient.Tests/FbBatchCommandTests.cs).


================================================
FILE: docs/decfloat.md
================================================
# DECFLOAT datatype

`DECFLOAT(16)` and `DECFLOAT(34)` from Firebird 4 is handled by `FbDecFloat` type. `FbDecFloat` can be used as parameter value for `FbParameter`.

### Examples

Examples can be found in [`FbDecFloat16SupportTests`](../src/FirebirdSql.Data.FirebirdClient.Tests/FbDecFloat16SupportTests.cs) and [`FbDecFloat34SupportTests`](../src/FirebirdSql.Data.FirebirdClient.Tests/FbDecFloat34SupportTests.cs).


================================================
FILE: docs/entity-framework-6.md
================================================
# Entity Framework 6

### Steps

* Install `EntityFramework.Firebird` from NuGet.
* Create `DbProviderFactories` record (see below).
* Create configuration (see below).
* Create your `DbContext`.
* Firebird 2.5 and up is supported.

### Code

```csharp
class Program
{
	static void Main(string[] args)
	{
		using (var db = new MyContext("database=localhost:demo.fdb;user=sysdba;password=masterkey"))
		{
			db.Database.Log = Console.WriteLine;

			db.Demos.ToList();
		}
	}
}

class MyContext : DbContext
{
	public MyContext(string connectionString)
		: base(new FbConnection(connectionString), true)
	{ }

	public DbSet<Demo> Demos { get; set; }

	protected override void OnModelCreating(DbModelBuilder modelBuilder)
	{
		base.OnModelCreating(modelBuilder);

		modelBuilder.Properties()
			.Configure(x => x.HasColumnName(x.ClrPropertyInfo.Name.ToUpper()));

		var demoConf = modelBuilder.Entity<Demo>();
		demoConf.ToTable("DEMO");
	}
}

class Demo
{
	public int Id { get; set; }
	public string FooBar { get; set; }
}
```

### DbProviderFactories

.NET Framework:
```xml
<system.data>
	<DbProviderFactories>
		<remove invariant="FirebirdSql.Data.FirebirdClient" />
		<add name="FirebirdClient" description="FirebirdClient" invariant="FirebirdSql.Data.FirebirdClient" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient" />
	</DbProviderFactories>
</system.data>
```

.NET Core/.NET 5+:
```csharp
System.Data.Common.DbProviderFactories.RegisterFactory(FbProviderServices.ProviderInvariantName, FirebirdClientFactory.Instance);
```

### Configuration

.NET Framework:
```xml
<configSections>
	<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
	<defaultConnectionFactory type="EntityFramework.Firebird.FbConnectionFactory, EntityFramework.Firebird" />
	<providers>
		<provider invariantName="FirebirdSql.Data.FirebirdClient" type="EntityFramework.Firebird.FbProviderServices, EntityFramework.Firebird" />
	</providers>
</entityFramework>
```

.NET Core/.NET 5+:
```csharp
public class Conf : DbConfiguration
{
	public Conf()
	{
		SetProviderServices(FbProviderServices.ProviderInvariantName, FbProviderServices.Instance);
	}
}
```

### Scripts

```sql
create table demo (id int primary key, foobar varchar(20) character set utf8);
```

```sql
insert into demo values (6, 'FooBar');
```


================================================
FILE: docs/entity-framework-core.md
================================================
# Entity Framework Core 8.x

* Install `FirebirdSql.EntityFrameworkCore.Firebird` from NuGet.
* Create your `DbContext`.
* Call `UseFirebird` in `OnConfiguring`.
* Firebird 3 and up is supported.

### Code

```csharp
class Program
{
	static void Main(string[] args)
	{
		using (var db = new MyContext("database=localhost:demo.fdb;user=sysdba;password=masterkey"))
		{
			db.Demos.ToList();
		}
	}
}

class MyContext : DbContext
{
	static readonly ILoggerFactory MyLoggerFactory = LoggerFactory.Create(builder => { builder.AddConsole(); });

	readonly string _connectionString;

	public MyContext(string connectionString)
	{
		_connectionString = connectionString;
	}

	public DbSet<Demo> Demos { get; set; }

	protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
	{
		base.OnConfiguring(optionsBuilder);

		optionsBuilder
			.UseLoggerFactory(MyLoggerFactory)
			.UseFirebird(_connectionString);
	}

	protected override void OnModelCreating(ModelBuilder modelBuilder)
	{
		base.OnModelCreating(modelBuilder);

		var demoConf = modelBuilder.Entity<Demo>();
		demoConf.Property(x => x.Id).HasColumnName("ID");
		demoConf.Property(x => x.FooBar).HasColumnName("FOOBAR");
		demoConf.ToTable("DEMO");
	}
}

class Demo
{
	public int Id { get; set; }
	public string FooBar { get; set; }
}
```

### Scripts

```sql
create table demo (id int primary key, foobar varchar(20) character set utf8);
```

```sql
insert into demo values (6, 'FooBar');
```


================================================
FILE: docs/events.md
================================================
# Events

### Steps

* Install `FirebirdSql.Data.FirebirdClient` from NuGet.
* Add `using FirebirdSql.Data.FirebirdClient;`.

### Code

```csharp
using (var events = new FbRemoteEvent("database=localhost:demo.fdb;user=sysdba;password=masterkey"))
{
	events.RemoteEventCounts += (sender, e) => Console.WriteLine($"Event: {e.Name} | Counts: {e.Counts}");
	events.RemoteEventError += (sender, e) => Console.WriteLine($"ERROR: {e.Error}");
	events.QueueEvents("EVENT1", "EVENT2", "EVENT3", "EVENT4");
	Console.WriteLine("Listening...");
	Console.ReadLine();
}
```


================================================
FILE: docs/int128.md
================================================
# INT128 datatype

`INT128` from Firebird 4 is handled by regular .NET `BigInteger` type. `BigInteger` can be used as parameter value for `FbParameter`.

### Examples

Examples can be found in [`FbInt128SupportTests`](../src/FirebirdSql.Data.FirebirdClient.Tests/FbInt128SupportTests.cs).


================================================
FILE: docs/services-backup.md
================================================
# Services - Backup

### Steps

* Install `FirebirdSql.Data.FirebirdClient` from NuGet.
* Add `using FirebirdSql.Data.Services;`.

### Code

```csharp
var backup = new FbBackup("database=localhost:demo.fdb;user=sysdba;password=masterkey");
backup.BackupFiles.Add(new FbBackupFile(@"C:\backup.fbk"));
//backup.Options = ...
backup.Verbose = true;
backup.ServiceOutput += (sender, e) => Console.WriteLine(e.Message);
backup.Execute();
```

### More
* `FbRestore`
* `FbStreamingBackup`
* `FbStreamingRestore`

================================================
FILE: docs/time-zones.md
================================================
# Time zones

Time zones from Firebird 4 are handled by `FbZonedDateTime` and `FbZonedTime` types respectively. Given the lack of proper support for time zones in .NET (especially cross platform), these types provide the building blocks for developer to work with time zones using some library (i.e. _NodaTime_). Both `FbZonedDateTime` and `FbZonedTime` can be used as parameter value for `FbParameter`.

### Examples

Examples can be found in [`FbTimeZonesSupportTests`](../src/FirebirdSql.Data.FirebirdClient.Tests/FbTimeZonesSupportTests.cs).


================================================
FILE: header.ps1
================================================
$LicenseHeader = @"
/*
 *    The contents of this file are subject to the Initial
 *    Developer's Public License Version 1.0 (the "License");
 *    you may not use this file except in compliance with the
 *    License. You may obtain a copy of the License at
 *    https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt.
 *
 *    Software distributed under the License is distributed on
 *    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
 *    express or implied. See the License for the specific
 *    language governing rights and limitations under the License.
 *
 *    All Rights Reserved.
 */
"@

$baseDir = Split-Path -Parent $PSCommandPath

gci $baseDir -Recurse -Filter *.cs | %{
	$content = gc $_.FullName -Encoding UTF8
	$newContent = @()
	
	$started = $false
	foreach ($line in $content) {
		if ($line.StartsWith('//$Authors')) {
			$started = $true
			$line = $LicenseHeader + "`r`n`r`n" + $line
		}
		if ($started) {
			$newContent += $line
		}		
	}
	if (!$started) {
		#echo $_.FullName
		return
	}

	sc $_.FullName $newContent -Encoding UTF8
}

================================================
FILE: include.ps1
================================================
function Check-ExitCode() {
	$exitCode = $LASTEXITCODE
	if ($exitCode -ne 0) {
		echo "Non-zero ($exitCode) exit code. Exiting..."
		exit $exitCode
	}
}

================================================
FILE: license.txt
================================================
Initial Developer's Public License Version 1.0

1. Definitions

1.0 "Commercial Use" means distribution or otherwise making the Covered Code available to a third party.

1.1 "Contributor" means each entity that creates or contributes to the creation of Modifications.

1.2 "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.

1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.

1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data.

1.5. "Executable" means Covered Code in any form other than Source Code.

1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.

1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.

1.8. "License" means this document.

1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.

1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:

Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.

Any new file that contains any part of the Original Code or previous Modifications.

1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.

1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.

1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.

1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity w hich controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.

2. Source Code License.

2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:

(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and

(b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof).

(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License.

d) Notwithstanding Section 2.1(b) above, no patent license is granted:

1) for code that You delete from the Original Code;

2) separate from the Original Code; or

3) for infringements caused by:

i) the modification of the Original Code or

ii) the combination of the Original Code with other software or devices.

2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license

(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and

(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).

(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code.

(d) Notwithstanding Section 2.2(b) above, no patent license is granted:

1) for any code that Contributor has deleted from the Contributor Version;

2) separate from the Contributor Version;

3) for infringements caused by: i) third party modifications of Contributor Version or

ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or

4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor.

3. Distribution Obligations.

3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.

3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.

3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in

(a) the Source Code, and

(b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.

3.4. Intellectual Property Matters

a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.

(b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file.

(c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License.

3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.

3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and hat the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.

3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.

4. Inability to Comply Due to Statute or Regulation.

If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must:

(a) comply with the terms of this License to the maximum extent possible; and

(b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.

5. Application of this License.

This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code.

6. Versions of the License.

6.1. New Versions. The Initial Developer of this code may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.

6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by the Initial Developer. No one other than the Initial Developer has the right to modify the terms applicable to Covered Code created under this License.

6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must

(a) rename Your license so that the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL", or any confusingly similar phrases do not appear in your license (except to note that your license differs from this License) and

(b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)

6.4 Origin of the Initial Developer's Public License. The Initial Developer's Public License is based on the Mozilla Public License V 1.1 with the following changes:

1) The license is published by the Initial Developer of this code. Only the Initial Developer can modify the terms applicable to Covered Code.

2) The license can be modified and used for code which is not already governed by this license. Modified versions of the license must be renamed to avoid confusion with the Initial Developer's Public License and must include a description of changes from the Initial Developer's Public License.

3) The name of the license in Exhibit A is the "Initial Developer's Public License".

4) The reference to an alternative license in Exhibit A has been removed .

5) Amendments I, II, III, V, and VI have been deleted.

6) Exhibit A, Netscape Public License has been deleted

7. DISCLAIMER OF WARRANTY.

COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.

8. TERMINATION.

8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.

8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that:

(a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either:

(i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or

(ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant.

If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above.

(b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant.

8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.

8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination.

9. LIMITATION OF LIABILITY.

UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.

10. U.S. GOVERNMENT END USERS.

The Covered Code is a "commercial item", as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation", as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.

11. MISCELLANEOUS.

This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.

12. RESPONSIBILITY FOR CLAIMS.

As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.

13. MULTIPLE-LICENSED CODE.

Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Devpoeloper permits you to utilize portions of the Covered Code under Your choice of the IDPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A.

EXHIBIT A -Initial Developer's Public License.

The contents of this file are subject to the Initial Developer's Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License from the Firebird Project website, at http://www.firebirdsql.org/en/initial-developer-s-public-license-version-1-0/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is ______________________________________.

The Initial Developer of the Original Code is ________________________.

Portions created by ______________________
are Copyright (C) ______ _______________________.

All Rights Reserved.

Contributor(s): ______________________________________. 


================================================
FILE: src/.editorconfig
================================================
root = true

[*]
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true

[*.cs]
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
csharp_style_implicit_object_creation_when_type_is_apparent = false
csharp_prefer_simple_using_statement = false

================================================
FILE: src/Directory.Build.props
================================================
<Project>
	<Import Project="Versions.props" />
	<PropertyGroup>
		<LangVersion>latest</LangVersion>
		<DebugType>portable</DebugType>
	</PropertyGroup>
	<PropertyGroup>
		<Company>FirebirdSQL</Company>
		<Product>NETProvider</Product>
		<Authors>FirebirdSQL</Authors>
		<PackageProjectUrl>http://www.firebirdsql.org/en/net-provider/</PackageProjectUrl>
		<PackageIconUrl>https://raw.githubusercontent.com/FirebirdSQL/NETProvider/master/firebird-logo.png</PackageIconUrl>
		<PackageIcon>firebird-logo.png</PackageIcon>
		<RepositoryUrl>https://github.com/FirebirdSQL/NETProvider</RepositoryUrl>
		<RepositoryType>git</RepositoryType>
		<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
		<MinClientVersion>3.6</MinClientVersion>
		<IncludeSymbols>true</IncludeSymbols>
		<SymbolPackageFormat>snupkg</SymbolPackageFormat>
		<PackageLicenseFile>license.txt</PackageLicenseFile>
	</PropertyGroup>
	<PropertyGroup>
		<CopyrightEndYear>2026</CopyrightEndYear>
	</PropertyGroup>

	<!-- SourceLink -->
	<PropertyGroup Condition="'$(SkipSourceLink)'!='true'">
		<PublishRepositoryUrl>true</PublishRepositoryUrl>
		<EmbedUntrackedSources>true</EmbedUntrackedSources>
	</PropertyGroup>
	<ItemGroup Condition="'$(SkipSourceLink)'!='true'">
		<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
			<PrivateAssets>all</PrivateAssets>
			<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
		</PackageReference>
	</ItemGroup>
</Project>


================================================
FILE: src/EntityFramework.Firebird/App.config.install.xdt
================================================
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
	<entityFramework>
		<defaultConnectionFactory xdt:Transform="Remove" />
		<defaultConnectionFactory type="EntityFramework.Firebird.FbConnectionFactory, EntityFramework.Firebird" xdt:Transform="Insert" />
		<providers>
			<provider invariantName="FirebirdSql.Data.FirebirdClient" type="EntityFramework.Firebird.FbProviderServices, EntityFramework.Firebird" xdt:Transform="InsertIfMissing" xdt:Locator="Match(invariantName)" />
		</providers>
	</entityFramework>
</configuration>


================================================
FILE: src/EntityFramework.Firebird/DefaultFbMigrationSqlGeneratorBehavior.cs
================================================
/*
 *    The contents of this file are subject to the Initial
 *    Developer's Public License Version 1.0 (the "License");
 *    you may not use this file except in compliance with the
 *    License. You may obtain a copy of the License at
 *    https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt.
 *
 *    Software distributed under the License is distributed on
 *    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
 *    express or implied. See the License for the specific
 *    language governing rights and limitations under the License.
 *
 *    All Rights Reserved.
 */

//$Authors = Jiri Cincura (jiri@cincura.net)

using System.Collections.Generic;

namespace EntityFramework.Firebird;

public class DefaultFbMigrationSqlGeneratorBehavior : IFbMigrationSqlGeneratorBehavior
{
	public virtual IEnumerable<string> CreateIdentityForColumn(string columnName, string tableName)
	{
		var identitySequenceName = CreateIdentitySequenceName(columnName, tableName);
		using (var writer = FbMigrationSqlGenerator.SqlWriter())
		{
			writer.WriteLine("EXECUTE BLOCK");
			writer.WriteLine("AS");
			writer.WriteLine("BEGIN");
			writer.Indent++;
			writer.Write("if (not exists(select 1 from rdb$generators where rdb$generator_name = '");
			writer.Write(identitySequenceName);
			writer.Write("')) then");
			writer.WriteLine();
			writer.WriteLine("begin");
			writer.Indent++;
			writer.Write("execute statement 'create sequence ");
			writer.Write(identitySequenceName);
			writer.Write("';");
			writer.WriteLine();
			writer.Indent--;
			writer.WriteLine("end");
			writer.Indent--;
			writer.Write("END");
			yield return writer.ToString();
		}

		using (var writer = FbMigrationSqlGenerator.SqlWriter())
		{
			writer.Write("CREATE OR ALTER TRIGGER ");
			writer.Write(FbMigrationSqlGenerator.Quote(CreateTriggerName(columnName, tableName)));
			writer.Write(" ACTIVE BEFORE INSERT ON ");
			writer.Write(FbMigrationSqlGenerator.Quote(tableName));
			writer.WriteLine();
			writer.WriteLine("AS");
			writer.WriteLine("BEGIN");
			writer.Indent++;
			writer.Write("if (new.");
			writer.Write(FbMigrationSqlGenerator.Quote(columnName));
			writer.Write(" is null) then");
			writer.WriteLine();
			writer.WriteLine("begin");
			writer.Indent++;
			writer.Write("new.");
			writer.Write(FbMigrationSqlGenerator.Quote(columnName));
			writer.Write(" = next value for ");
			writer.Write(identitySequenceName);
			writer.Write(";");
			writer.WriteLine();
			writer.Indent--;
			writer.WriteLine("end");
			writer.Indent--;
			writer.Write("END");
			yield return writer.ToString();
		}
	}

	public virtual IEnumerable<string> DropIdentityForColumn(string columnName, string tableName)
	{
		var triggerName = CreateTriggerName(columnName, tableName);
		using (var writer = FbMigrationSqlGenerator.SqlWriter())
		{
			writer.WriteLine("EXECUTE BLOCK");
			writer.WriteLine("AS");
			writer.WriteLine("BEGIN");
			writer.Indent++;
			writer.Write("if (exists(select 1 from rdb$triggers where rdb$trigger_name = '");
			writer.Write(triggerName);
			writer.Write("')) then");
			writer.WriteLine();
			writer.WriteLine("begin");
			writer.Indent++;
			writer.Write("execute statement 'drop trigger ");
			writer.Write(FbMigrationSqlGenerator.Quote(triggerName));
			writer.Write("';");
			writer.WriteLine();
			writer.Indent--;
			writer.WriteLine("end");
			writer.Indent--;
			writer.Write("END");
			yield return writer.ToString();
		}
	}

	protected virtual string CreateTriggerName(string columnName, string tableName)
	{
		return string.Format("ID_{0}_{1}", tableName, columnName);
	}

	protected virtual string CreateIdentitySequenceName(string columnName, string tableName)
	{
		return "GEN_IDENTITY";
	}
}


================================================
FILE: src/EntityFramework.Firebird/EntityFramework.Firebird.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
	<PropertyGroup>
		<TargetFrameworks>net48;netstandard2.1</TargetFrameworks>
		<AssemblyName>EntityFramework.Firebird</AssemblyName>
		<RootNamespace>EntityFramework.Firebird</RootNamespace>
		<SignAssembly>true</SignAssembly>
		<AssemblyOriginatorKeyFile>Properties\EntityFramework.Firebird.snk</AssemblyOriginatorKeyFile>
		<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
		<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
	</PropertyGroup>
	<PropertyGroup>
		<Version>$(EF6ProviderVersion)</Version>
		<AssemblyTitle>NETProvider - Entity Framework Provider</AssemblyTitle>
		<Copyright>(c) 2014-$(CopyrightEndYear)</Copyright>
	</PropertyGroup>
	<PropertyGroup>
		<PackageId>EntityFramework.Firebird</PackageId>
		<Title>Firebird Entity Framework Provider</Title>
		<PackageDescription>The Entity Framework provider for Firebird enables you to develop .NET applications that connect to the Firebird database using Entity Framework.</PackageDescription>
		<PackageTags>firebird firebirsql firebirdclient entityframewor adonet database</PackageTags>
	</PropertyGroup>
	<PropertyGroup Condition="'$(Configuration)'=='Release'">
		<DefineConstants>EF6;TRACE</DefineConstants>
	</PropertyGroup>
	<PropertyGroup Condition="'$(Configuration)'=='Debug'">
		<DefineConstants>EF6;DEBUG;TRACE</DefineConstants>
	</PropertyGroup>
	<ItemGroup>
		<None Remove="Resources\ProviderManifest.xml" />
		<None Remove="Resources\StoreSchemaDefinition.ssdl" />
		<None Remove="Resources\StoreSchemaDefinitionVersion3.ssdl" />
		<None Remove="Resources\StoreSchemaMapping.msl" />
		<None Remove="Resources\StoreSchemaMappingVersion3.msl" />
	</ItemGroup>
	<ItemGroup>
		<EmbeddedResource Include="Resources\ProviderManifest.xml" />
		<EmbeddedResource Include="Resources\StoreSchemaDefinition.ssdl" />
		<EmbeddedResource Include="Resources\StoreSchemaDefinitionVersion3.ssdl" />
		<EmbeddedResource Include="Resources\StoreSchemaMapping.msl" />
		<EmbeddedResource Include="Resources\StoreSchemaMappingVersion3.msl" />
	</ItemGroup>
	<ItemGroup>
		<None Update="App.config.install.xdt" Pack="true" PackagePath="content" />
		<None Update="Web.config.install.xdt" Pack="true" PackagePath="content" />
		<None Include="..\..\license.txt" Pack="true" PackagePath="" />
		<None Include="..\..\firebird-logo.png" Pack="true" PackagePath="" />
	</ItemGroup>
	<ItemGroup>
		<PackageReference Include="EntityFramework" Version="$(EF6ReferencePackageVersion)" />
		<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="$(EF6ReferenceProviderVersion)" />
	</ItemGroup>
	<ItemGroup Condition="'$(TargetFramework)'=='net48'">
		<Reference Include="System.Configuration" />
		<Reference Include="Microsoft.CSharp" />
	</ItemGroup>
	<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.1'">
	</ItemGroup>
</Project>


================================================
FILE: src/EntityFramework.Firebird/FbConnectionFactory.cs
================================================
/*
 *    The contents of this file are subject to the Initial
 *    Developer's Public License Version 1.0 (the "License");
 *    you may not use this file except in compliance with the
 *    License. You may obtain a copy of the License at
 *    https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt.
 *
 *    Software distributed under the License is distributed on
 *    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
 *    express or implied. See the License for the specific
 *    language governing rights and limitations under the License.
 *
 *    All Rights Reserved.
 */

//$Authors = Jiri Cincura (jiri@cincura.net)

using System;
using System.Configuration;
using System.Data.Common;
using System.Data.Entity.Infrastructure;
using System.Linq;

using FirebirdSql.Data.FirebirdClient;

namespace EntityFramework.Firebird;

public class FbConnectionFactory : IDbConnectionFactory
{
	public DbConnection CreateConnection(string nameOrConnectionString)
	{
		if (nameOrConnectionString == null)
			throw new ArgumentNullException(nameof(nameOrConnectionString));

		if (nameOrConnectionString.Contains('='))
		{
			return new FbConnection(nameOrConnectionString);
		}
		else
		{
			var configuration = ConfigurationManager.ConnectionStrings[nameOrConnectionString];
			if (configuration == null)
				throw new ArgumentException("Specified connection string name cannot be found.");
			return new FbConnection(configuration.ConnectionString);
		}
	}
}


================================================
FILE: src/EntityFramework.Firebird/FbMigrationSqlGenerator.cs
================================================
/*
 *    The contents of this file are subject to the Initial
 *    Developer's Public License Version 1.0 (the "License");
 *    you may not use this file except in compliance with the
 *    License. You may obtain a copy of the License at
 *    https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt.
 *
 *    Software distributed under the License is distributed on
 *    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
 *    express or implied. See the License for the specific
 *    language governing rights and limitations under the License.
 *
 *    All Rights Reserved.
 */

//$Authors = Jiri Cincura (jiri@cincura.net)

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Core.Common;
using System.Data.Entity.Core.Common.CommandTrees;
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
using System.Data.Entity.Core.Metadata.Edm;
using System.Data.Entity.Infrastructure.DependencyResolution;
using System.Data.Entity.Migrations.Model;
using System.Data.Entity.Migrations.Sql;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using EntityFramework.Firebird.SqlGen;
using FirebirdSql.Data.Common;

namespace EntityFramework.Firebird;

public class FbMigrationSqlGenerator : MigrationSqlGenerator
{
	readonly IFbMigrationSqlGeneratorBehavior _behavior;

	string _migrationsHistoryTableName;

	public FbMigrationSqlGenerator(IFbMigrationSqlGeneratorBehavior behavior = null)
	{
		_behavior = behavior ?? new DefaultFbMigrationSqlGeneratorBehavior();
	}

	public override IEnumerable<MigrationStatement> Generate(IEnumerable<MigrationOperation> migrationOperations, string providerManifestToken)
	{
		InitializeProviderServices(providerManifestToken);

		var lastOperation = migrationOperations.Last();
		var historyOperation = lastOperation is UpdateDatabaseOperation updateDatabaseOperation
			? updateDatabaseOperation.Migrations.First().Operations.OfType<HistoryOperation>().First()
			: lastOperation as HistoryOperation;

		if (historyOperation != null)
		{
			var modify = historyOperation.CommandTrees.First();
			_migrationsHistoryTableName = ((DbScanExpression)modify.Target.Expression).Target.Table;
		}
		//This happens only and only if downgrading database to initial point (ie. reverting also Initial migration)
		else
		{
			var dropTableOperation = (DropTableOperation)lastOperation; //DropTableOperation for MigrationHistory-table
			_migrationsHistoryTableName = Regex.Replace(dropTableOperation.Name, @".+\.(.+)", "$1");
		}

		return GenerateStatements(migrationOperations).ToArray();
	}

	void InitializeProviderServices(string providerManifestToken)
	{
		using (var connection = CreateConnection())
		{
			ProviderManifest = DbProviderServices.GetProviderServices(connection).GetProviderManifest(providerManifestToken);
		}
	}

	#region Operations

	protected IEnumerable<MigrationStatement> Generate(MigrationOperation operation)
	{
		throw new NotSupportedException(string.Format("Unknown operation '{0}'.", operation.GetType().FullName));
	}

	protected virtual IEnumerable<MigrationStatement> Generate(UpdateDatabaseOperation operation)
	{
		return GenerateStatements(operation.Migrations.SelectMany(x => x.Operations));
	}

	protected virtual IEnumerable<MigrationStatement> Generate(SqlOperation operation)
	{
		yield return Statement(operation.Sql, operation.SuppressTransaction);
	}

	protected virtual IEnumerable<MigrationStatement> Generate(AddColumnOperation operation)
	{
		var tableName = CheckName(ExtractName(operation.Table));
		var column = operation.Column;
		if (column.IsNullable != null
				&& !column.IsNullable.Value
				&& column.DefaultValue == null
				&& string.IsNullOrWhiteSpace(column.DefaultValueSql)
				&& !column.IsIdentity
				&& !column.IsTimestamp)
		{
			column.DefaultValue = column.ClrDefaultValue;
		}
		var columnData = Generate(column, tableName);
		using (var writer = SqlWriter())
		{
			writer.Write("ALTER TABLE ");
			writer.Write(Quote(tableName));
			writer.Write(" ADD ");
			writer.Write(columnData.Item1);
			yield return Statement(writer);
		}
		foreach (var item in columnData.Item2.Select(x => Statement(x)))
			yield return item;
	}

	protected virtual IEnumerable<MigrationStatement> Generate(AddForeignKeyOperation operation)
	{
		using (var writer = SqlWriter())
		{
			writer.Write("ALTER TABLE ");
			writer.Write(Quote(CheckName(ExtractName(operation.DependentTable))));
			writer.Write(" ADD CONSTRAINT ");
			writer.Write(Quote(CheckName(CreateItemName(operation.Name))));
			writer.Write(" FOREIGN KEY (");
			WriteColumns(writer, operation.DependentColumns.Select(Quote));
			writer.Write(") REFERENCES ");
			writer.Write(Quote(CheckName(ExtractName(operation.PrincipalTable))));
			writer.Write(" (");
			WriteColumns(writer, operation.PrincipalColumns.Select(Quote));
			writer.Write(")");
			if (operation.CascadeDelete)
			{
				writer.Write(" ON DELETE CASCADE");
			}
			yield return Statement(writer);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(AddPrimaryKeyOperation operation)
	{
		using (var writer = SqlWriter())
		{
			writer.Write("ALTER TABLE ");
			writer.Write(Quote(CheckName(ExtractName(operation.Table))));
			writer.Write(" ADD CONSTRAINT ");
			writer.Write(Quote(CheckName(CreateItemName(operation.Name))));
			writer.Write(" PRIMARY KEY (");
			WriteColumns(writer, operation.Columns.Select(Quote));
			writer.Write(")");
			yield return Statement(writer);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(AlterColumnOperation operation)
	{
		var column = operation.Column;
		var tableName = CheckName(ExtractName(operation.Table));
		var columnName = CheckName(column.Name);
		// drop NOT NULL first, either it will be recreated or it was to drop
		using (var writer = SqlWriter())
		{
			writer.WriteLine("EXECUTE BLOCK");
			writer.WriteLine("AS");
			writer.WriteLine("declare constraint_name type of column rdb$relation_constraints.rdb$constraint_name;");
			writer.WriteLine("BEGIN");
			writer.Indent++;
			writer.WriteLine("select rc.rdb$constraint_name");
			writer.WriteLine("from rdb$relation_constraints rc");
			writer.WriteLine("join rdb$check_constraints cc on rc.rdb$constraint_name = cc.rdb$constraint_name");
			writer.Write("where rc.rdb$constraint_type = 'NOT NULL' and rc.rdb$relation_name = '");
			writer.Write(tableName);
			writer.Write("' and cc.rdb$trigger_name  = '");
			writer.Write(columnName);
			writer.Write("'");
			writer.WriteLine();
			writer.WriteLine("into :constraint_name;");
			writer.WriteLine("if (constraint_name is not null) then");
			writer.WriteLine("begin");
			writer.Indent++;
			writer.Write("execute statement 'alter table ");
			writer.Write(Quote(tableName));
			writer.Write(" drop constraint ' || :constraint_name;");
			writer.WriteLine();
			writer.Indent--;
			writer.WriteLine("end");
			writer.Indent--;
			writer.Write("END");
			yield return Statement(writer);
		}
		// drop identity trigger first, either it will be recreated or it was to drop
		foreach (var item in _behavior.DropIdentityForColumn(columnName, tableName))
			yield return Statement(item);

		using (var writer = SqlWriter())
		{
			writer.Write("ALTER TABLE ");
			writer.Write(Quote(tableName));
			writer.Write(" ALTER COLUMN ");
			writer.Write(Quote(columnName));
			writer.Write(" TYPE ");
			writer.Write(BuildPropertyType(column));
			// possible NOT NULL drop was dropped with statement above
			if (column.IsNullable != null && !column.IsNullable.Value)
			{
				writer.Write(" NOT NULL");
			}
			if (column.Type == PrimitiveTypeKind.Boolean)
			{
				writer.Write(" CHECK(");
				writer.Write(Quote(columnName));
				writer.Write(" IN (0,1))");
			}
			yield return Statement(writer);
		}

		if (column.DefaultValue != null || !string.IsNullOrWhiteSpace(column.DefaultValueSql))
		{
			using (var writer = SqlWriter())
			{
				writer.Write("ALTER TABLE ");
				writer.Write(Quote(tableName));
				writer.Write(" ALTER COLUMN ");
				writer.Write(Quote(columnName));
				writer.Write(" DROP DEFAULT");
				yield return Statement(writer);
			}

			using (var writer = SqlWriter())
			{
				writer.Write("ALTER TABLE ");
				writer.Write(Quote(tableName));
				writer.Write(" ALTER COLUMN ");
				writer.Write(Quote(columnName));
				writer.Write(" SET DEFAULT ");
				writer.Write(column.DefaultValue != null ? WriteValue((dynamic)column.DefaultValue) : column.DefaultValueSql);
				yield return Statement(writer);
			}
		}

		if (column.IsIdentity)
		{
			// possible identity drop was dropped with statement above
			foreach (var item in _behavior.CreateIdentityForColumn(columnName, tableName))
				yield return Statement(item);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(AlterProcedureOperation operation)
	{
		return Generate(operation, "ALTER");
	}

	protected virtual IEnumerable<MigrationStatement> Generate(AlterTableOperation operation)
	{
		// Nothing to do since there is no inherent semantics associated with annotations
		yield break;
	}

	protected virtual IEnumerable<MigrationStatement> Generate(CreateIndexOperation operation)
	{
		using (var writer = SqlWriter())
		{
			writer.Write("CREATE ");
			if (operation.IsUnique)
			{
				writer.Write("UNIQUE ");
			}
			writer.Write("INDEX ");
			writer.Write(Quote(CheckName(CreateItemName(BuildIndexName(operation)))));
			writer.Write(" ON ");
			writer.Write(Quote(CheckName(ExtractName(operation.Table))));
			writer.Write("(");
			WriteColumns(writer, operation.Columns.Select(Quote));
			writer.Write(")");
			yield return Statement(writer);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(CreateProcedureOperation operation)
	{
		return Generate(operation, "CREATE");
	}

	protected virtual IEnumerable<MigrationStatement> Generate(CreateTableOperation operation)
	{
		var tableName = CheckName(ExtractName(operation.Name));
		var isMigrationsHistoryTable = tableName.Equals(_migrationsHistoryTableName, StringComparison.InvariantCulture);
		var columnsData = operation.Columns.Select(x => Generate(x, tableName)).ToArray();
		using (var writer = SqlWriter())
		{
			if (isMigrationsHistoryTable)
			{
				writer.WriteLine("EXECUTE BLOCK");
				writer.WriteLine("AS");
				writer.WriteLine("BEGIN");
				writer.Indent++;
				writer.WriteLine("EXECUTE STATEMENT");
				writer.Indent++;
				writer.Write("'");
			}
			writer.Write("CREATE TABLE ");
			writer.Write(Quote(tableName));
			writer.Write(" (");
			writer.WriteLine();
			writer.Indent++;
			WriteColumns(writer, columnsData.Select(x => x.Item1), true);
			writer.Indent--;
			writer.WriteLine();
			writer.Write(")");
			if (isMigrationsHistoryTable)
			{
				writer.WriteLine("'");
				writer.Indent--;
				writer.WriteLine("WITH AUTONOMOUS TRANSACTION;");
				writer.Indent--;
				writer.Write("END");
			}
			yield return Statement(writer);
		}
		if (operation.PrimaryKey != null)
		{
			foreach (var item in Generate(operation.PrimaryKey))
				yield return item;
		}
		foreach (var item in columnsData.SelectMany(x => x.Item2).Select(x => Statement(x)))
			yield return item;
	}

	protected virtual IEnumerable<MigrationStatement> Generate(DropColumnOperation operation)
	{
		using (var writer = SqlWriter())
		{
			writer.Write("ALTER TABLE ");
			writer.Write(Quote(CheckName(ExtractName(operation.Table))));
			writer.Write(" DROP ");
			writer.Write(Quote(CheckName(operation.Name)));
			yield return Statement(writer);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(DropForeignKeyOperation operation)
	{
		using (var writer = SqlWriter())
		{
			writer.Write("ALTER TABLE ");
			writer.Write(Quote(CheckName(ExtractName(operation.DependentTable))));
			writer.Write(" DROP CONSTRAINT ");
			writer.Write(Quote(CheckName(CreateItemName(operation.Name))));
			yield return Statement(writer);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(DropIndexOperation operation)
	{
		using (var writer = SqlWriter())
		{
			writer.Write("DROP INDEX ");
			writer.Write(Quote(CheckName(CreateItemName(BuildIndexName(operation)))));
			yield return Statement(writer);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(DropPrimaryKeyOperation operation)
	{
		using (var writer = SqlWriter())
		{
			writer.Write("ALTER TABLE ");
			writer.Write(Quote(CheckName(ExtractName(operation.Table))));
			writer.Write(" DROP CONSTRAINT ");
			writer.Write(Quote(CheckName(CreateItemName(operation.Name))));
			yield return Statement(writer);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(DropProcedureOperation operation)
	{
		using (var writer = SqlWriter())
		{
			writer.Write("DROP PROCEDURE ");
			writer.Write(Quote(CheckName(ExtractName(operation.Name))));
			yield return Statement(writer);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(DropTableOperation operation)
	{
		using (var writer = SqlWriter())
		{
			writer.Write("DROP TABLE ");
			writer.Write(Quote(CheckName(ExtractName(operation.Name))));
			yield return Statement(writer);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(MoveProcedureOperation operation)
	{
		throw new NotSupportedException("Moving procedure is not supported by Firebird.");
	}

	protected virtual IEnumerable<MigrationStatement> Generate(MoveTableOperation operation)
	{
		throw new NotSupportedException("Moving table is not supported by Firebird.");
	}

	protected virtual IEnumerable<MigrationStatement> Generate(RenameColumnOperation operation)
	{
		using (var writer = SqlWriter())
		{
			writer.Write("ALTER TABLE ");
			writer.Write(Quote(CheckName(ExtractName(operation.Table))));
			writer.Write(" ALTER COLUMN ");
			writer.Write(Quote(CheckName(operation.Name)));
			writer.Write(" TO ");
			writer.Write(Quote(CheckName(operation.NewName)));
			yield return Statement(writer);
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(RenameIndexOperation operation)
	{
		throw new NotSupportedException("Renaming index is not supported by Firebird.");
	}

	protected virtual IEnumerable<MigrationStatement> Generate(RenameProcedureOperation operation)
	{
		throw new NotSupportedException("Renaming procedure is not supported by Firebird.");
	}

	protected virtual IEnumerable<MigrationStatement> Generate(RenameTableOperation operation)
	{
		throw new NotSupportedException("Renaming table is not supported by Firebird.");
	}

	protected virtual IEnumerable<MigrationStatement> Generate(HistoryOperation operation)
	{
		foreach (var commandTree in operation.CommandTrees)
		{
			List<DbParameter> _;

			switch (commandTree.CommandTreeKind)
			{
				case DbCommandTreeKind.Insert:
					const int MigrationIdColumn = 0;
					const int ContextKeyColumn = 1;
					const int ModelColumn = 2;
					const int VersionColumn = 3;
					const int MaxChunkLength = 32000;

					var dbInsert = (DbInsertCommandTree)commandTree;
					var modelData = ((dbInsert.SetClauses[ModelColumn] as DbSetClause).Value as DbConstantExpression).Value as byte[];

					// If model length is less than max value, stick to original version
					if (modelData.Length < MaxChunkLength)
					{
						using (var writer = SqlWriter())
						{
							writer.Write(DmlSqlGenerator.GenerateInsertSql(dbInsert, out _, generateParameters: false));
							yield return Statement(writer);
						}
					}
					else
					{
						// If it's bigger - we split it into chunks, as big as possible
						var dataChunks = modelData.Split(MaxChunkLength);

						// We can't change CommandTree, but we can create new one, only difference being data length
						using (var writer = SqlWriter())
						{
							var setClauses = new ReadOnlyCollection<DbModificationClause>(
									new List<DbModificationClause>
									{
											dbInsert.SetClauses[MigrationIdColumn],
											dbInsert.SetClauses[ContextKeyColumn],
											DbExpressionBuilder.SetClause(
												((DbSetClause)dbInsert.SetClauses[ModelColumn]).Property,
												dataChunks.ElementAt(0).ToArray()
											),
											dbInsert.SetClauses[VersionColumn],
									});


							var newCommandTree = new DbInsertCommandTree(dbInsert.MetadataWorkspace, commandTree.DataSpace, dbInsert.Target, setClauses, dbInsert.Returning);

							writer.Write(DmlSqlGenerator.GenerateInsertSql(newCommandTree, out _, generateParameters: false));
							yield return Statement(writer);
						}

						// Now we have first Insert, let's update it with chunks of remaing data
						foreach (var dataChunk in dataChunks.Skip(1))
						{
							using (var writer = SqlWriter())
							{
								var modelProperty = (dbInsert.SetClauses[ModelColumn] as DbSetClause).Property as DbPropertyExpression;

								var modificationClauses = new List<DbModificationClause>
									{
										// Updating existing chunk of data with subsequent part
										DbExpressionBuilder.SetClause(
											modelProperty,
											// TODO: Better solution required
											// Best if we could use DbExpression.Concat, but it returns DbFunctionExpression, which is not supported
											// Here we'll get SET Model = 'data', which we can update as text later
											dataChunk.ToArray()
										)
									}.AsReadOnly();

								var updateCommandTree = new DbUpdateCommandTree(dbInsert.MetadataWorkspace,
									dbInsert.DataSpace,
									dbInsert.Target,
									// Predicate is MigrationId value
									DbExpressionBuilder.Equal(
										((DbSetClause)dbInsert.SetClauses[MigrationIdColumn]).Property,
										((DbSetClause)dbInsert.SetClauses[MigrationIdColumn]).Value),
									modificationClauses,
									dbInsert.Returning);

								writer.Write(DmlSqlGenerator.GenerateUpdateSql(updateCommandTree, out _, generateParameters: false));

								// Since we couldn't concat before, replacing query as string
								// Replacing SET Model = 'data'
								//		with SET Model = Model || 'data'
								// Model being first is important, since these are parts of single value
								var statement = writer.ToString();
								var newStatement = statement.Replace($"SET \"{modelProperty.Property.Name}\" = ", $"SET \"{modelProperty.Property.Name}\" = \"{modelProperty.Property.Name}\" || ");

								yield return Statement(newStatement);
							}
						}
					}
					break;
				case DbCommandTreeKind.Delete:
					using (var writer = SqlWriter())
					{
						writer.Write(DmlSqlGenerator.GenerateDeleteSql((DbDeleteCommandTree)commandTree, out _, generateParameters: false));
						yield return Statement(writer);
					}
					break;
			}
		}
	}

	protected virtual IEnumerable<MigrationStatement> Generate(ProcedureOperation operation, string action)
	{
		using (var writer = SqlWriter())
		{
			var inputParameters = operation.Parameters.Where(x => !x.IsOutParameter).ToArray();
			var outputParameters = operation.Parameters.Where(x => x.IsOutParameter).ToArray();

			writer.Write(action);
			writer.Write(" PROCEDURE ");
			writer.Write(Quote(CheckName(ExtractName(operation.Name))));
			if (inputParameters.Any())
			{
				writer.Write(" (");
				writer.WriteLine();
				writer.Indent++;
				WriteColumns(writer, inputParameters.Select(Generate), true);
				writer.Indent--;
				writer.WriteLine();
				writer.Write(")");
			}
			if (outputParameters.Any())
			{
				writer.WriteLine();
				writer.Write("RETURNS (");
				writer.WriteLine();
				writer.Indent++;
				WriteColumns(writer, outputParameters.Select(Generate), true);
				writer.Indent--;
				writer.WriteLine();
				writer.Write(")");
			}
			writer.WriteLine();
			writer.WriteLine("AS");
			writer.WriteLine("BEGIN");
			writer.Write(operation.BodySql);
			writer.WriteLine();
			writer.Write("END");
			yield return Statement(writer);
		}
	}

	protected (string, IEnumerable<string>) Generate(ColumnModel column, string tableName)
	{
		var builder = new StringBuilder();
		var additionalCommands = new List<string>();

		var columnName = CheckName(column.Name);

		var columnType = BuildPropertyType(column);
		builder.Append(Quote(columnName));
		builder.Append(" ");
		builder.Append(columnType);

		if (column.DefaultValue != null)
		{
			builder.Append(" DEFAULT ");
			builder.Append(WriteValue((dynamic)column.DefaultValue));
		}
		else if (!string.IsNullOrWhiteSpace(column.DefaultValueSql))
		{
			builder.Append(" DEFAULT ");
			builder.Append(column.DefaultValueSql);
		}

		if ((column.IsNullable != null)
			&& !column.IsNullable.Value)
		{
			builder.Append(" NOT NULL");
		}

		if (column.Type == PrimitiveTypeKind.Boolean)
		{
			builder.Append(" CHECK(");
			builder.Append(Quote(columnName));
			builder.Append(" IN (0,1))");
		}

		if (column.IsIdentity)
		{
			var identity = _behavior.CreateIdentityForColumn(columnName, tableName);
			additionalCommands.AddRange(identity.Where(x => !string.IsNullOrWhiteSpace(x)));
		}

		return (builder.ToString(), additionalCommands);
	}

	protected string Generate(ParameterModel parameter)
	{
		var builder = new StringBuilder();
		builder.Append(Quote(CheckName(parameter.Name)));
		builder.Append(" ");
		builder.Append(BuildPropertyType(parameter));
		return builder.ToString();
	}

	#endregion

	#region Helpers

	static MigrationStatement Statement(SqlWriter sqlWriter, bool suppressTransaction = false)
	{
		return Statement(sqlWriter.ToString(), suppressTransaction);
	}
	protected static MigrationStatement Statement(string sql, bool suppressTransaction = false)
	{
		return new MigrationStatement
		{
			Sql = sql,
			SuppressTransaction = suppressTransaction,
			BatchTerminator = ";",
		};
	}

	protected static string WriteValue(object value)
	{
		return string.Format(CultureInfo.InvariantCulture, "{0}", value);
	}

	protected static string WriteValue(DateTime value)
	{
		return SqlGenerator.FormatDateTime(value);
	}

	protected static string WriteValue(byte[] value)
	{
		return SqlGenerator.FormatBinary(value);
	}

	protected static string WriteValue(bool value)
	{
		return SqlGenerator.FormatBoolean(value);
	}

	protected static string WriteValue(Guid value)
	{
		return SqlGenerator.FormatGuid(value);
	}

	protected static string WriteValue(string value)
	{
		return SqlGenerator.FormatString(value, true);
	}

	protected static string WriteValue(TimeSpan value)
	{
		return SqlGenerator.FormatTime(value);
	}

	protected internal static string Quote(string name)
	{
		return SqlGenerator.QuoteIdentifier(name);
	}

	internal static SqlWriter SqlWriter()
	{
		var result = new SqlWriter(new StringBuilder());
		result.Indent++;
		return result;
	}

	string BuildPropertyType(PropertyModel propertyModel)
	{
		var storeTypeName = propertyModel.StoreType;
		var typeUsage = ProviderManifest.GetStoreType(propertyModel.TypeUsage);
		if (!string.IsNullOrWhiteSpace(storeTypeName))
		{
			typeUsage = BuildStoreTypeUsage(storeTypeName, propertyModel) ?? typeUsage;
		}
		return SqlGenerator.GetSqlPrimitiveType(typeUsage);
	}

	static string BuildIndexName(IndexOperation indexOperation)
	{
		return !indexOperation.HasDefaultName
			? indexOperation.Name
			: IndexOperation.BuildDefaultName(new[] { ExtractName(indexOperation.Table) }.Concat(indexOperation.Columns));
	}

	static string ExtractName(string name)
	{
		return name.Substring(name.LastIndexOf('.') + 1);
	}

	static string CreateItemName(string name)
	{
		while (true)
		{
			var match = Regex.Match(name, @"^(?<prefix>.+_)[^.]+\.(?<suffix>.+)$");
			if (!match.Success)
				break;
			name = match.Result("${prefix}${suffix}");
		}
		return name;
	}

	static string CheckName(string name)
	{
		const int LengthLimit = 31;
		if (name.Length > LengthLimit)
			throw new ArgumentOutOfRangeException($"The name '{name}' is longer than Firebird's {LengthLimit} characters limit for object names.");
		return name;
	}

	static void WriteColumns(SqlWriter writer, IEnumerable<string> columns, bool separateLines = false)
	{
		var separator = (string)null;
		foreach (var column in columns)
		{
			if (separator != null)
			{
				writer.Write(separator);
				if (separateLines)
					writer.WriteLine();
			}
			writer.Write(column);
			separator = ", ";
		}
	}

	static DbConnection CreateConnection()
	{
		return DbConfiguration.DependencyResolver.GetService<DbProviderFactory>(FbProviderServices.ProviderInvariantName).CreateConnection();
	}

	IEnumerable<MigrationStatement> GenerateStatements(IEnumerable<MigrationOperation> operations)
	{
		return operations.Select<dynamic, IEnumerable<MigrationStatement>>(x => Generate(x)).SelectMany(x => x);
	}

	#endregion
}


================================================
FILE: src/EntityFramework.Firebird/FbMigrationsTransactionsInterceptor.cs
================================================
/*
 *    The contents of this file are subject to the Initial
 *    Developer's Public License Version 1.0 (the "License");
 *    you may not use this file except in compliance with the
 *    License. You may obtain a copy of the License at
 *    https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt.
 *
 *    Software distributed under the License is distributed on
 *    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
 *    express or implied. See the License for the specific
 *    language governing rights and limitations under the License.
 *
 *    All Rights Reserved.
 */

//$Authors = Jiri Cincura (jiri@cincura.net)

using System;
using System.Data;
using System.Data.Common;
using System.Data.Entity.Infrastructure.Interception;
using System.Diagnostics;
using System.Linq;
using FirebirdSql.Data.FirebirdClient;

namespace EntityFramework.Firebird;

// Migrations are executed in Serializable transaction. Because of my "AUTONOMOUS TRANSACTION" usage
// I better use ReadCommitted. Here I plug in, in case of Migrations.
class FbMigrationsTransactionsInterceptor : IDbConnectionInterceptor
{
	public void BeginningTransaction(DbConnection connection, BeginTransactionInterceptionContext interceptionContext)
	{
		if (connection is FbConnection
			&& interceptionContext.IsolationLevel == IsolationLevel.Serializable
			&& IsInMigrations())
		{
			interceptionContext.Result = connection.BeginTransaction(IsolationLevel.ReadCommitted);
		}
	}

	public static bool IsInMigrations()
	{
		var stackTrace = new StackTrace(false);
		return stackTrace.GetFrames().Any(f => f.GetMethod().ReflectedType?.Namespace.Equals("System.Data.Entity.Migrations", StringComparison.Ordinal) ?? false);
	}

	public void BeganTransaction(DbConnection connection, BeginTransactionInterceptionContext interceptionContext)
	{ }

	public void Closed(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
	{ }

	public void Closing(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
	{ }

	public void ConnectionStringGetting(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
	{ }

	public void ConnectionStringGot(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
	{ }

	public void ConnectionStringSet(DbConnection connection, DbConnectionPropertyInterceptionContext<string> interceptionContext)
	{ }

	public void ConnectionStringSetting(DbConnection connection, DbConnectionPropertyInterceptionContext<string> interceptionContext)
	{ }

	public void ConnectionTimeoutGetting(DbConnection connection, DbConnectionInterceptionContext<int> interceptionContext)
	{ }

	public void ConnectionTimeoutGot(DbConnection connection, DbConnectionInterceptionContext<int> interceptionContext)
	{ }

	public void DataSourceGetting(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
	{ }

	public void DataSourceGot(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
	{ }

	public void DatabaseGetting(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
	{ }

	public void DatabaseGot(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
	{ }

	public void Disposed(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
	{ }

	public void Disposing(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
	{ }

	public void EnlistedTransaction(DbConnection connection, EnlistTransactionInterceptionContext interceptionContext)
	{ }

	public void EnlistingTransaction(DbConnection connection, EnlistTransactionInterceptionContext interceptionContext)
	{ }

	public void Opened(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
	{ }

	public void Opening(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
	{ }

	public void ServerVersionGetting(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
	{ }

	public void ServerVersionGot(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
	{ }

	public void StateGetting(DbConnection connection, DbConnectionInterceptionContext<ConnectionState> interceptionContext)
	{ }

	public void StateGot(DbConnection connection, DbConnectionInterceptionContext<ConnectionState> interceptionContext)
	{ }
}


================================================
FILE: src/EntityFramework.Firebird/FbProviderManifest.cs
================================================
/*
 *    The contents of this file are subject to the Initial
 *    Developer's Public License Version 1.0 (the "License");
 *    you may not use this file except in compliance with the
 *    License. You may obtain a copy of the License at
 *    https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt.
 *
 *    Software distributed under the License is distributed on
 *    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
 *    express or implied. See the License for the specific
 *    language governing rights and limitations under the License.
 *
 *    All Rights Reserved.
 */

//$Authors = Jiri Cincura (jiri@cincura.net)

using System;
using System.Data.Entity.Core;
using System.Data.Entity.Core.Common;
using System.Data.Entity.Core.Metadata.Edm;
using System.Diagnostics;
using System.Reflection;
using System.Text;
using System.Xml;

namespace EntityFramework.Firebird;

public class FbProviderManifest : DbXmlEnabledProviderManifest
{
	#region Private Fields

	internal const int BinaryMaxSize = Int32.MaxValue;
	internal const int AsciiVarcharMaxSize = 32765;
	internal const int UnicodeVarcharMaxSize = AsciiVarcharMaxSize / 4;
	internal const char LikeEscapeCharacter = '\\';

	private System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType> _primitiveTypes = null;
	private System.Collections.ObjectModel.ReadOnlyCollection<EdmFunction> _functions = null;

	#endregion

	#region Constructors

	/// <summary>
	/// Constructor
	/// </summary>
	/// <param name="manifestToken">A token used to infer the capabilities of the store</param>
	public FbProviderManifest(string manifestToken)
		: base(FbProviderManifest.GetProviderManifest())
	{ }

	#endregion

	#region Properties
	#endregion

	internal static XmlReader GetProviderManifest()
	{
		return GetXmlResource(GetManifestResourceName());
	}

	/// <summary>
	/// Providers should override this to return information specific to their provider.
	///
	/// This method should never return null.
	/// </summary>
	/// <param name="informationType">The name of the information to be retrieved.</param>
	/// <returns>An XmlReader at the begining of the information requested.</returns>
	protected override XmlReader GetDbInformation(string informationType)
	{
		if (informationType == StoreSchemaDefinition || informationType == StoreSchemaDefinitionVersion3)
		{
			return GetStoreSchemaDescription(informationType);
		}
		if (informationType == StoreSchemaMapping || informationType == StoreSchemaMappingVersion3)
		{
			return GetStoreSchemaMapping(informationType);
		}
		if (informationType == ConceptualSchemaDefinition || informationType == ConceptualSchemaDefinitionVersion3)
		{
			return null;
		}

		throw new ProviderIncompatibleException(string.Format("The provider returned null for the informationType '{0}'.", informationType));
	}

	public override System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType> GetStoreTypes()
	{
		if (_primitiveTypes == null)
		{
			_primitiveTypes = base.GetStoreTypes();
		}

		return _primitiveTypes;
	}

	public override System.Collections.ObjectModel.ReadOnlyCollection<EdmFunction> GetStoreFunctions()
	{
		if (_functions == null)
		{
			_functions = base.GetStoreFunctions();
		}

		return _functions;
	}

	/// <summary>
	/// This method takes a type and a set of facets and returns the best mapped equivalent type
	/// in EDM.
	/// </summary>
	/// <param name="storeType">A TypeUsage encapsulating a store type and a set of facets</param>
	/// <returns>A TypeUsage encapsulating an EDM type and a set of facets</returns>
	public override TypeUsage GetEdmType(TypeUsage storeType)
	{
		if (storeType == null)
		{
			throw new ArgumentNullException("storeType");
		}

		var storeTypeName = storeType.EdmType.Name.ToLowerInvariant();
		if (!StoreTypeNameToEdmPrimitiveType.ContainsKey(storeTypeName))
		{
			throw new ArgumentException(string.Format("The underlying provider does not support the type '{0}'.", storeTypeName));
		}

		var edmPrimitiveType = base.StoreTypeNameToEdmPrimitiveType[storeTypeName];

		var maxLength = 0;
		var isUnicode = true;
		var isFixedLen = false;
		var isUnbounded = true;

		PrimitiveTypeKind newPrimitiveTypeKind;

		switch (storeTypeName)
		{
			// for some types we just go with simple type usage with no facets
			case "smallint":
			case "int":
			case "bigint":
			case "smallint_bool":
			case "float":
			case "double":
			case "guid":
				return TypeUsage.CreateDefaultTypeUsage(edmPrimitiveType);

			case "decimal":
			case "numeric":
				if (TypeHelpers.TryGetPrecision(storeType, out var precision) && TypeHelpers.TryGetScale(storeType, out var scale))
				{
					return TypeUsage.CreateDecimalTypeUsage(edmPrimitiveType, precision, scale);
				}
				else
				{
					return TypeUsage.CreateDecimalTypeUsage(edmPrimitiveType);
				}

			case "varchar":
				newPrimitiveTypeKind = PrimitiveTypeKind.String;
				isUnbounded = !TypeHelpers.TryGetMaxLength(storeType, out maxLength);
				isUnicode = true; //hardcoded
				isFixedLen = false;
				break;

			case "char":
				newPrimitiveTypeKind = PrimitiveTypeKind.String;
				isUnbounded = !TypeHelpers.TryGetMaxLength(storeType, out maxLength);
				isUnicode = true; //hardcoded
				isFixedLen = true;
				break;

			case "timestamp":
				return TypeUsage.CreateDateTimeTypeUsage(edmPrimitiveType, null);
			case "date":
				return TypeUsage.CreateDateTimeTypeUsage(edmPrimitiveType, null);
			case "time":
				return TypeUsage.CreateTimeTypeUsage(edmPrimitiveType, null);

			case "blob":
				newPrimitiveTypeKind = PrimitiveTypeKind.Binary;
				isUnbounded = true;
				isFixedLen = false;
				break;

			case "clob":
				newPrimitiveTypeKind = PrimitiveTypeKind.String;
				isUnbounded = true;
				isUnicode = true; //hardcoded
				isFixedLen = false;
				break;

			default:
				throw new NotSupportedException(string.Format("The underlying provider does not support the type '{0}'.", storeTypeName));
		}

		Debug.Assert(newPrimitiveTypeKind == PrimitiveTypeKind.String || newPrimitiveTypeKind == PrimitiveTypeKind.Binary, "at this point only string and binary types should be present");

		switch (newPrimitiveTypeKind)
		{
			case PrimitiveTypeKind.String:
				if (!isUnbounded)
				{
					return TypeUsage.CreateStringTypeUsage(edmPrimitiveType, isUnicode, isFixedLen, maxLength);
				}
				else
				{
					return TypeUsage.CreateStringTypeUsage(edmPrimitiveType, isUnicode, isFixedLen);
				}
			case PrimitiveTypeKind.Binary:
				if (!isUnbounded)
				{
					return TypeUsage.CreateBinaryTypeUsage(edmPrimitiveType, isFixedLen, maxLength);
				}
				else
				{
					return TypeUsage.CreateBinaryTypeUsage(edmPrimitiveType, isFixedLen);
				}
			default:
				throw new NotSupportedException(string.Format("The underlying provider does not support the type '{0}'.", storeTypeName));
		}
	}

	/// <summary>
	/// This method takes a type and a set of facets and returns the best mapped equivalent type
	/// in SQL Server, taking the store version into consideration.
	/// </summary>
	/// <param name="storeType">A TypeUsage encapsulating an EDM type and a set of facets</param>
	/// <returns>A TypeUsage encapsulating a store type and a set of facets</returns>
	public override TypeUsage GetStoreType(TypeUsage edmType)
	{
		if (edmType == null)
		{
			throw new ArgumentNullException("edmType");
		}
		Debug.Assert(edmType.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType);

		if (!(edmType.EdmType is PrimitiveType primitiveType))
		{
			throw new ArgumentException(string.Format("The underlying provider does not support the type '{0}'.", edmType));
		}

		var facets = edmType.Facets;

		switch (primitiveType.PrimitiveTypeKind)
		{
			case PrimitiveTypeKind.Boolean:
				return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["smallint_bool"]);

			case PrimitiveTypeKind.Int16:
				return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["smallint"]);

			case PrimitiveTypeKind.Int32:
				return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["int"]);

			case PrimitiveTypeKind.Int64:
				return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["bigint"]);

			case PrimitiveTypeKind.Double:
				return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["double"]);

			case PrimitiveTypeKind.Single:
				return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["float"]);

			case PrimitiveTypeKind.Decimal: // decimal, numeric
				{
					if (!TypeHelpers.TryGetPrecision(edmType, out var precision))
					{
						precision = 9;
					}

					if (!TypeHelpers.TryGetScale(edmType, out var scale))
					{
						scale = 0;
					}

					return TypeUsage.CreateDecimalTypeUsage(StoreTypeNameToStorePrimitiveType["decimal"], precision, scale);
				}

			case PrimitiveTypeKind.Binary: // blob
				{
					var isFixedLength = null != facets[MetadataHelpers.FixedLengthFacetName].Value && (bool)facets[MetadataHelpers.FixedLengthFacetName].Value;
					var f = facets[MetadataHelpers.MaxLengthFacetName];

					var isMaxLength = f.IsUnbounded || null == f.Value || (int)f.Value > BinaryMaxSize;
					var maxLength = !isMaxLength ? (int)f.Value : Int32.MinValue;

					TypeUsage tu;
					if (isFixedLength)
					{
						tu = TypeUsage.CreateBinaryTypeUsage(StoreTypeNameToStorePrimitiveType["blob"], true, maxLength);
					}
					else
					{
						if (isMaxLength)
						{
							tu = TypeUsage.CreateBinaryTypeUsage(StoreTypeNameToStorePrimitiveType["blob"], false);
							Debug.Assert(tu.Facets["MaxLength"].Description.IsConstant, "blob is not constant!");
						}
						else
						{
							tu = TypeUsage.CreateBinaryTypeUsage(StoreTypeNameToStorePrimitiveType["blob"], false, maxLength);
						}
					}
					return tu;
				}

			case PrimitiveTypeKind.String: // char, varchar, text blob
				{
					var isUnicode = null == facets[MetadataHelpers.UnicodeFacetName].Value || (bool)facets[MetadataHelpers.UnicodeFacetName].Value;
					var isFixedLength = null != facets[MetadataHelpers.FixedLengthFacetName].Value && (bool)facets[MetadataHelpers.FixedLengthFacetName].Value;
					var f = facets[MetadataHelpers.MaxLengthFacetName];
					// maxlen is true if facet value is unbounded, the value is bigger than the limited string sizes *or* the facet
					// value is null. this is needed since functions still have maxlength facet value as null
					var isMaxLength = f.IsUnbounded || null == f.Value || (int)f.Value > (isUnicode ? UnicodeVarcharMaxSize : AsciiVarcharMaxSize);
					var maxLength = !isMaxLength ? (int)f.Value : Int32.MinValue;

					TypeUsage tu;

					if (isUnicode)
					{
						if (isFixedLength)
						{
							tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["char"], true, true, maxLength);
						}
						else
						{
							if (isMaxLength)
							{
								tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["clob"], true, false);
							}
							else
							{
								tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["varchar"], true, false, maxLength);
							}
						}
					}
					else
					{
						if (isFixedLength)
						{
							tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["char"], false, true, maxLength);
						}
						else
						{
							if (isMaxLength)
							{
								tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["clob"], false, false);
							}
							else
							{
								tu = TypeUsage.CreateStringTypeUsage(StoreTypeNameToStorePrimitiveType["varchar"], false, false, maxLength);
							}
						}
					}
					return tu;
				}

			case PrimitiveTypeKind.DateTime: // datetime, date
				{
					bool useTimestamp;
					if (TypeHelpers.TryGetPrecision(edmType, out var precision))
					{
						if (precision == 0)
							useTimestamp = false;
						else
							useTimestamp = true;
					}
					else
					{
						useTimestamp = true;
					}

					return TypeUsage.CreateDefaultTypeUsage(useTimestamp ? StoreTypeNameToStorePrimitiveType["timestamp"] : StoreTypeNameToStorePrimitiveType["date"]);
				}

			case PrimitiveTypeKind.Time:
				return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["time"]);

			case PrimitiveTypeKind.Guid:
				return TypeUsage.CreateDefaultTypeUsage(StoreTypeNameToStorePrimitiveType["guid"]);

			default:
				throw new NotSupportedException(string.Format("There is no store type corresponding to the EDM type '{0}' of primitive type '{1}'.", edmType, primitiveType.PrimitiveTypeKind));
		}
	}

	private XmlReader GetStoreSchemaMapping(string mslName)
	{
		return GetXmlResource(GetStoreSchemaResourceName(mslName, "msl"));
	}

	private XmlReader GetStoreSchemaDescription(string ssdlName)
	{
		return GetXmlResource(GetStoreSchemaResourceName(ssdlName, "ssdl"));
	}

	private static XmlReader GetXmlResource(string resourceName)
	{
		var executingAssembly = Assembly.GetExecutingAssembly();
		var stream = executingAssembly.GetManifestResourceStream(resourceName);
		return XmlReader.Create(stream);
	}

	private static string GetManifestResourceName()
	{
		return "EntityFramework.Firebird.Resources.ProviderManifest.xml";
	}

	private static string GetStoreSchemaResourceName(string name, string type)
	{
		return string.Format("EntityFramework.Firebird.Resources.{0}.{1}", name, type);
	}

	public override bool SupportsEscapingLikeArgument(out char escapeCharacter)
	{
		escapeCharacter = LikeEscapeCharacter;
		return true;
	}

	public override string EscapeLikeArgument(string argument)
	{
		var sb = new StringBuilder(argument);
		sb.Replace(LikeEscapeCharacter.ToString(), LikeEscapeCharacter.ToString() + LikeEscapeCharacter.ToString());
		sb.Replace("%", LikeEscapeCharacter + "%");
		sb.Replace("_", LikeEscapeCharacter + "_");
		return sb.ToString();
	}

	public override bool SupportsInExpression()
	{
		return true;
	}

	public override bool SupportsParameterOptimizationInSchemaQueries()
	{
		return true;
	}
}


================================================
FILE: src/EntityFramework.Firebird/FbProviderServices.cs
================================================
/*
 *    The contents of this file are subject to the Initial
 *    Developer's Public License Version 1.0 (the "License");
 *    you may not use this file except in compliance with the
 *    License. You may obtain a copy of the License at
 *    https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt.
 *
 *    Software distributed under the License is distributed on
 *    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
 *    express or implied. See the License for the specific
 *    language governing rights and limitations under the License.
 *
 *    All Rights Reserved.
 */

//$Authors = Jiri Cincura (jiri@cincura.net)

using System;
using System.Data;
using System.Data.Common;
using System.Data.Entity.Core.Common;
using System.Data.Entity.Core.Common.CommandTrees;
using System.Data.Entity.Core.Metadata.Edm;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.Infrastructure.DependencyResolution;
using System.Data.Entity.Infrastructure.Interception;
using System.Data.Entity.Migrations.Sql;
using System.Diagnostics;
using System.Linq;
using EntityFramework.Firebird.SqlGen;
using FirebirdSql.Data.FirebirdClient;
using FirebirdSql.Data.Isql;
using FirebirdSql.Data.Services;

namespace EntityFramework.Firebird;

public class FbProviderServices : DbProviderServices
{
	public const string ProviderInvariantName = "FirebirdSql.Data.FirebirdClient";
	public static readonly FbProviderServices Instance = new FbProviderServices();

	public FbProviderServices()
	{
		AddDependencyResolver(new SingletonDependencyResolver<IDbConnectionFactory>(new FbConnectionFactory()));
		AddDependencyResolver(new SingletonDependencyResolver<Func<MigrationSqlGenerator>>(() => new FbMigrationSqlGenerator(), ProviderInvariantName));
		DbInterception.Add(new FbMigrationsTransactionsInterceptor());
	}

	protected override DbCommandDefinition CreateDbCommandDefinition(DbProviderManifest manifest, DbCommandTree commandTree)
	{
		var prototype = CreateCommand(manifest, commandTree);
		var result = CreateCommandDefinition(prototype);
		return result;
	}

	private DbCommand CreateCommand(DbProviderManifest manifest, DbCommandTree commandTree)
	{
		if (manifest == null)
			throw new ArgumentNullException("manifest");

		if (commandTree == null)
			throw new ArgumentNullException("commandTree");

		var expectedTypes = PrepareTypeCoercions(commandTree);

		var command = FbCommand.CreateWithTypeCoercions(expectedTypes);

		command.CommandText = SqlGenerator.GenerateSql(commandTree, out var parameters, out var commandType);
		command.CommandType = commandType;

		// Get the function (if any) implemented by the command tree since this influences our interpretation of parameters
		EdmFunction function = null;
		if (commandTree is DbFunctionCommandTree)
		{
			function = ((DbFunctionCommandTree)commandTree).EdmFunction;
		}

		// Now make sure we populate the command's parameters from the CQT's parameters:
		foreach (var queryParameter in commandTree.Parameters)
		{
			FbParameter parameter;

			// Use the corresponding function parameter TypeUsage where available (currently, the SSDL facets and
			// type trump user-defined facets and type in the EntityCommand).
			if (null != function && function.Parameters.TryGetValue(queryParameter.Key, false, out var functionParameter))
			{
				parameter = CreateSqlParameter(functionParameter.Name, functionParameter.TypeUsage, functionParameter.Mode, DBNull.Value);
			}
			else
			{
				parameter = CreateSqlParameter(queryParameter.Key, queryParameter.Value, ParameterMode.In, DBNull.Value);
			}

			command.Parameters.Add(parameter);
		}

		// Now add parameters added as part of SQL gen (note: this feature is only safe for DML SQL gen which
		// does not support user parameters, where there is no risk of name collision)
		if (null != parameters && 0 < parameters.Count)
		{
			if (!(commandTree is DbInsertCommandTree) &&
				!(commandTree is DbUpdateCommandTree) &&
				!(commandTree is DbDeleteCommandTree))
			{
				throw new InvalidOperationException("SqlGenParametersNotPermitted");
			}

			foreach (var parameter in parameters)
			{
				command.Parameters.Add(parameter);
			}
		}

		return command;
	}

	protected override string GetDbProviderManifestToken(DbConnection connection)
	{
		try
		{
			var serverVersion = default(Version);
			if (connection.State == ConnectionState.Open)
			{
				serverVersion = FbServerProperties.ParseServerVersion(connection.ServerVersion);
			}
			else
			{
				var serverProperties = new FbServerProperties() { ConnectionString = connection.ConnectionString };
				serverVersion = FbServerProperties.ParseServerVersion(serverProperties.GetServerVersion());
			}
			return serverVersion.ToString(2);
		}
		catch (Exception ex)
		{
			throw new InvalidOperationException("Could not retrieve storage version.", ex);
		}
	}

	protected override DbProviderManifest GetDbProviderManifest(string versionHint)
	{
		if (string.IsNullOrEmpty(versionHint))
		{
			throw new ArgumentException("Could not determine store version; a valid store connection or a version hint is required.");
		}
		return new FbProviderManifest(versionHint);
	}

	internal static FbParameter CreateSqlParameter(string name, TypeUsage type, ParameterMode mode, object value)
	{
		var result = new FbParameter(name, value);

		var direction = MetadataHelpers.ParameterModeToParameterDirection(mode);
		if (result.Direction != direction)
		{
			result.Direction = direction;
		}

		// output parameters are handled differently (we need to ensure there is space for return
		// values where the user has not given a specific Size/MaxLength)
		var isOutParam = mode != ParameterMode.In;
		var sqlDbType = GetSqlDbType(type, isOutParam, out var size);

		if (result.FbDbType != sqlDbType)
		{
			result.FbDbType = sqlDbType;
		}

		// Note that we overwrite 'facet' parameters where either the value is different or
		// there is an output parameter.
		if (size.HasValue && (isOutParam || result.Size != size.Value))
		{
			result.Size = size.Value;
		}

		var isNullable = MetadataHelpers.IsNullable(type);
		if (isOutParam || isNullable != result.IsNullable)
		{
			result.IsNullable = isNullable;
		}

		return result;
	}

	private static FbDbType GetSqlDbType(TypeUsage type, bool isOutParam, out int? size)
	{
		// only supported for primitive type
		var primitiveTypeKind = MetadataHelpers.GetPrimitiveTypeKind(type);

		size = default;

		switch (primitiveTypeKind)
		{
			case PrimitiveTypeKind.Boolean:
				return FbDbType.SmallInt;

			case PrimitiveTypeKind.Int16:
				return FbDbType.SmallInt;

			case PrimitiveTypeKind.Int32:
				return FbDbType.Integer;

			case PrimitiveTypeKind.Int64:
				return FbDbType.BigInt;

			case PrimitiveTypeKind.Double:
				return FbDbType.Double;

			case PrimitiveTypeKind.Single:
				return FbDbType.Float;

			case PrimitiveTypeKind.Decimal:
				return FbDbType.Decimal;

			case PrimitiveTypeKind.Binary:
				// for output parameters, ensure there is space...
				size = GetParameterSize(type, isOutParam);
				return GetBinaryDbType(type);

			case PrimitiveTypeKind.String:
				size = GetParameterSize(type, isOutParam);
				return GetStringDbType(type);

			case PrimitiveTypeKind.DateTime:
				return FbDbType.TimeStamp;

			case PrimitiveTypeKind.Time:
				return FbDbType.Time;

			case PrimitiveTypeKind.Guid:
				return FbDbType.Guid;

			default:
				Debug.Fail("unknown PrimitiveTypeKind " + primitiveTypeKind);
				throw new InvalidOperationException("unknown PrimitiveTypeKind " + primitiveTypeKind);
		}
	}

	private static int? GetParameterSize(TypeUsage type, bool isOutParam)
	{
		if (MetadataHelpers.TryGetMaxLength(type, out var maxLength))
		{
			// if the MaxLength facet has a specific value use it
			return maxLength;
		}
		else if (isOutParam)
		{
			// if the parameter is a return/out/inout parameter, ensure there
			// is space for any value
			return int.MaxValue;
		}
		else
		{
			// no value
			return default;
		}
	}

	private static FbDbType GetStringDbType(TypeUsage type)
	{
		Debug.Assert(type.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType && PrimitiveTypeKind.String == ((PrimitiveType)type.EdmType).PrimitiveTypeKind, "only valid for string type");

		FbDbType dbType;
		// Specific type depends on whether the string is a unicode string and whether it is a fixed length string.
		// By default, assume widest type (unicode) and most common type (variable length)
		if (!MetadataHelpers.TryGetIsFixedLength(type, out var fixedLength))
		{
			fixedLength = false;
		}

		if (!MetadataHelpers.TryGetIsUnicode(type, out var unicode))
		{
			unicode = true;
		}

		if (fixedLength)
		{
			dbType = (unicode ? FbDbType.Char : FbDbType.Char);
		}
		else
		{
			if (!MetadataHelpers.TryGetMaxLength(type, out var maxLength))
			{
				maxLength = (unicode ? FbProviderManifest.UnicodeVarcharMaxSize : FbProviderManifest.AsciiVarcharMaxSize);
			}
			if (maxLength == default || maxLength > (unicode ? FbProviderManifest.UnicodeVarcharMaxSize : FbProviderManifest.AsciiVarcharMaxSize))
			{
				dbType = FbDbType.Text;
			}
			else
			{
				dbType = (unicode ? FbDbType.VarChar : FbDbType.VarChar);
			}
		}

		return dbType;
	}

	private static FbDbType GetBinaryDbType(TypeUsage type)
	{
		Debug.Assert(type.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType &&
			PrimitiveTypeKind.Binary == ((PrimitiveType)type.EdmType).PrimitiveTypeKind, "only valid for binary type");

		// Specific type depends on whether the binary value is fixed length. By default, assume variable length.
		//bool fixedLength;
		//if (!MetadataHelpers.TryGetIsFixedLength(type, out fixedLength))
		//{
		//    fixedLength = false;
		//}

		return FbDbType.Binary;
	}

	private static Type[] PrepareTypeCoercions(DbCommandTree commandTree)
	{
		if (commandTree is DbQueryCommandTree queryTree)
		{
			if (queryTree.Query is DbProjectExpression projectExpression)
			{
				var resultsType = projectExpression.Projection.ResultType.EdmType;
				if (resultsType is StructuralType resultsAsStructuralType)
				{
					var members = resultsAsStructuralType.Members;
					return members.Select(ExtractExpectedTypeForCoercion).ToArray();
				}
			}
		}

		if (commandTree is DbFunctionCommandTree functionTree)
		{
			if (functionTree.ResultType != null)
			{
				Debug.Assert(MetadataHelpers.IsCollectionType(functionTree.ResultType.EdmType), "Result type of a function is expected to be a collection of RowType or PrimitiveType");

				var typeUsage = MetadataHelpers.GetElementTypeUsage(functionTree.ResultType);
				var elementType = typeUsage.EdmType;
				if (MetadataHelpers.IsRowType(elementType))
				{
					var members = ((RowType)elementType).Members;
					return members.Select(ExtractExpectedTypeForCoercion).ToArray();
				}
				else if (MetadataHelpers.IsPrimitiveType(elementType))
				{
					return new[] { MakeTypeCoercion(((PrimitiveType)elementType).ClrEquivalentType, typeUsage) };
				}
				else
				{
					Debug.Fail("Result type of a function is expected to be a collection of RowType or PrimitiveType");
				}
			}
		}

		return null;
	}

	private static Type ExtractExpectedTypeForCoercion(EdmMember member)
	{
		var type = ((PrimitiveType)member.TypeUsage.EdmType).ClrEquivalentType;
		return MakeTypeCoercion(type, member.TypeUsage);
	}

	private static Type MakeTypeCoercion(Type type, TypeUsage typeUsage)
	{
		if (type.IsValueType && MetadataHelpers.IsNullable(typeUsage))
			return typeof(Nullable<>).MakeGenericType(type);
		return type;
	}

	protected override void DbCreateDatabase(DbConnection connection, int? commandTimeout,
#pragma warning disable 3001
			StoreItemCollection storeItemCollection)
#pragma warning restore 3001
	{
		FbConnection.CreateDatabase(connection.ConnectionString, pageSize: 16384);
		var script = DbCreateDatabaseScript(GetDbProviderManifestToken(connection), storeItemCollection);
		var fbScript = new FbScript(script);
		fbScript.Parse();
		if (fbScript.Results.Any())
		{
			using (var fbConnection = new FbConnection(connection.ConnectionString))
			{
				var execution = new FbBatchExecution(fbConnection);
				execution.AppendSqlStatements(fbScript);
				execution.Execute();
			}
		}
	}

	protected override string DbCreateDatabaseScript(string providerManifestToken,
#pragma warning disable 3001
			StoreItemCollection storeItemCollection)
#pragma warning restore 3001
	{
		return SsdlToFb.Transform(storeItemCollection, providerManifestToken);
	}

	protected override bool DbDatabaseExists(DbConnection connection, int? commandTimeout,
#pragma warning disable 3001
			StoreItemCollection storeItemCollection)
#pragma warning restore 3001
	{
		if (connection.State == ConnectionState.Open
			   || connection.State == ConnectionState.Executing
			   || connection.State == ConnectionState.Fetching)
		{
			return true;
		}
		else
		{
			try
			{
				connection.Open();
				return true;
			}
			catch
			{
				return false;
			}
			finally
			{
				try
				{
					connection.Close();
				}
				catch { }
			}
		}
	}

	protected override void DbDeleteDatabase(DbConnection connection, int? commandTimeout,
#pragma warning disable 3001
			StoreItemCollection storeItemCollection)
#pragma warning restore 3001
	{
		FbConnection.DropDatabase(connection.ConnectionString);
	}
}


================================================
FILE: src/EntityFramework.Firebird/IFbMigrationSqlGeneratorBehavior.cs
================================================
/*
 *    The contents of this file are subject to the Initial
 *    Developer's Public License Version 1.0 (the "License");
 *    you may not use this file except in compliance with the
 *    License. You may obtain a copy of the License at
 *    https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt.
 *
 *    Software distributed under the License is distributed on
 *    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
 *    express or implied. See the License for the specific
 *    language governing rights and limitations under the License.
 *
 *    All Rights Reserved.
 */

//$Authors = Jiri Cincura (jiri@cincura.net)

using System.Collections.Generic;

namespace EntityFramework.Firebird;

public interface IFbMigrationSqlGeneratorBehavior
{
	IEnumerable<string> CreateIdentityForColumn(string columnName, string tableName);
	IEnumerable<string> DropIdentityForColumn(string columnName, string tableName);
}


================================================
FILE: src/EntityFramework.Firebird/MetadataHelpers.cs
================================================
/*
 *    The contents of this file are subject to the Initial
 *    Developer's Public License Version 1.0 (the "License");
 *    you may not use this file except in compliance with the
 *    License. You may obtain a copy of the License at
 *    https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt.
 *
 *    Software distributed under the License is distributed on
 *    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
 *    express or implied. See the License for the specific
 *    language governing rights and limitations under the License.
 *
 *    All Rights Reserved.
 */

//$Authors = Jiri Cincura (jiri@cincura.net)

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity.Core.Metadata.Edm;
using System.Diagnostics;

namespace EntityFramework.Firebird;

internal static class MetadataHelpers
{
	#region Type Helpers

	/// <summary>
	/// Cast the EdmType of the given type usage to the given TEdmType
	/// </summary>
	/// <typeparam name="TEdmType"></typeparam>
	/// <param name="typeUsage"></param>
	/// <returns></returns>
	internal static TEdmType GetEdmType<TEdmType>(TypeUsage typeUsage)
		where TEdmType : EdmType
	{
		return (TEdmType)typeUsage.EdmType;
	}

	/// <summary>
	/// Gets the TypeUsage of the elment if the given type is a collection type
	/// </summary>
	/// <param name="type"></param>
	/// <returns></returns>
	internal static TypeUsage GetElementTypeUsage(TypeUsage type)
	{
		if (MetadataHelpers.IsCollectionType(type))
		{
			return ((CollectionType)type.EdmType).TypeUsage;
		}
		return null;
	}

	/// <summary>
	/// Retrieves the properties of in the EdmType underlying the input type usage,
	///  if that EdmType is a structured type (EntityType, RowType).
	/// </summary>
	/// <param name="typeUsage"></param>
	/// <returns></returns>
	internal static IList<EdmProperty> GetProperties(TypeUsage typeUsage)
	{
		return MetadataHelpers.GetProperties(typeUsage.EdmType);
	}

	/// <summary>
	/// Retrieves the properties of the given EdmType, if it is
	///  a structured type (EntityType, RowType).
	/// </summary>
	/// <param name="edmType"></param>
	/// <returns></returns>
	internal static IList<EdmProperty> GetProperties(EdmType edmType)
	{
		switch (edmType.BuiltInTypeKind)
		{
			case BuiltInTypeKind.ComplexType:
				return ((ComplexType)edmType).Properties;
			case BuiltInTypeKind.EntityType:
				return ((EntityType)edmType).Properties;
			case BuiltInTypeKind.RowType:
				return ((RowType)edmType).Properties;
			default:
				return new List<EdmProperty>();
		}
	}

	/// <summary>
	/// Is the given type usage over a collection type
	/// </summary>
	/// <param name="typeUsage"></param>
	/// <returns></returns>
	internal static bool IsCollectionType(TypeUsage typeUsage)
	{
		return MetadataHelpers.IsCollectionType(typeUsage.EdmType);
	}

	/// <summary>
	/// Is the given type a collection type
	/// </summary>
	/// <param name="type"></param>
	/// <returns></returns>
	internal static bool IsCollectionType(EdmType type)
	{
		return (BuiltInTypeKind.CollectionType == type.BuiltInTypeKind);
	}

	/// <summary>
	/// Is the given type usage over a primitive type
	/// </summary>
	/// <param name="type"></param>
	/// <returns></returns>
	internal static bool IsPrimitiveType(TypeUsage type)
	{
		return MetadataHelpers.IsPrimitiveType(type.EdmType);
	}

	/// <summary>
	/// Is the given type a primitive type
	/// </summary>
	/// <param name="type"></param>
	/// <returns></returns>
	internal static bool IsPrimitiveType(EdmType type)
	{
		return (BuiltInTypeKind.PrimitiveType == type.BuiltInTypeKind);
	}

	/// <summary>
	/// Is the given type usage over a row type
	/// </summary>
	/// <param name="type"></param>
	/// <returns></returns>
	internal static bool IsRowType(TypeUsage type)
	{
		return MetadataHelpers.IsRowType(type.EdmType);
	}

	/// <summary>
	/// Is the given type a row type
	/// </summary>
	/// <param name="type"></param>
	/// <returns></returns>
	internal static bool IsRowType(EdmType type)
	{
		return (BuiltInTypeKind.RowType == type.BuiltInTypeKind);
	}

	/// <summary>
	/// Gets the type of the given type usage if it is a primitive type
	/// </summary>
	/// <param name="type"></param>
	/// <param name="typeKind"></param>
	/// <returns></returns>
	internal static bool TryGetPrimitiveTypeKind(TypeUsage type, out PrimitiveTypeKind typeKind)
	{
		if (type != null && type.EdmType != null && type.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType)
		{
			typeKind = ((PrimitiveType)type.EdmType).PrimitiveTypeKind;
			return true;
		}

		typeKind = default;
		return false;
	}

	internal static PrimitiveTypeKind GetPrimitiveTypeKind(TypeUsage type)
	{
		if (!MetadataHelpers.TryGetPrimitiveTypeKind(type, out var returnValue))
		{
			Debug.Assert(false, "Cannot create parameter of non-primitive type");
			throw new NotSupportedException("Cannot create parameter of non-primitive type");
		}
		return returnValue;
	}

	/// <summary>
	/// Gets the value for the metadata property with the given name
	/// </summary>
	/// <typeparam name="T"></typeparam>
	/// <param name="item"></param>
	/// <param name="propertyName"></param>
	/// <returns></returns>
	internal static T TryGetValueForMetadataProperty<T>(MetadataItem item, string propertyName)
	{
		if (!item.MetadataProperties.TryGetValue(propertyName, true, out var property))
		{
			return default;
		}

		return (T)property.Value;
	}

	internal static bool IsPrimitiveType(TypeUsage type, PrimitiveTypeKind primitiveType)
	{
		if (TryGetPrimitiveTypeKind(type, out var typeKind))
		{
			return (typeKind == primitiveType);
		}
		return false;
	}

	#endregion

	#region Facet Support

	#region Facet Names
	/// <summary>
	/// Name of the MaxLength Facet
	/// </summary>
	internal const string MaxLengthFacetName = "MaxLength";

	/// <summary>
	/// Name of the Unicode Facet
	/// </summary>
	internal const string UnicodeFacetName = "Unicode";

	/// <summary>
	/// Name of the FixedLength Facet
	/// </summary>
	internal const string FixedLengthFacetName = "FixedLength";

	/// <summary>
	/// Name of the Precision Facet
	/// </summary>
	internal const string PrecisionFacetName = "Precision";

	/// <summary>
	/// Name of the Scale Facet
	/// </summary>
	internal const string ScaleFacetName = "Scale";

	/// <summary>
	/// Name of the DefaultValue Facet
	/// </summary>
	internal const string DefaultValueFacetName = "DefaultValue";

	/// <summary>
	/// Name of the Nullable Facet
	/// </summary>
	internal const string NullableFacetName = "Nullable";

	/// <summary>
	/// Name of StoreGeneratedPattern Facet
	/// </summary>
	internal const string StoreGeneratedPatternFacetName = "StoreGeneratedPattern";
	#endregion

	#region Facet Retreival Helpers

	/// <summary>
	/// Get the value specified on the given type usage for the given facet name.
	/// If the faces does not have a value specifid or that value is null returns
	/// the default value for that facet.
	/// </summary>
	/// <typeparam name="T"></typeparam>
	/// <param name="type"></param>
	/// <param name="facetName"></param>
	/// <returns></returns>
	/// <summary>
	/// Get the value specified on the given type usage for the given facet name.
	/// If the faces does not have a value specifid or that value is null returns
	/// the default value for that facet.
	/// </summary>
	/// <typeparam name="T"></typeparam>
	/// <param name="type"></param>
	/// <param name="facetName"></param>
	/// <returns></returns>
	internal static T GetFacetValueOrDefault<T>(TypeUsage type, string facetName, T defaultValue)
	{
		//Get the value for the facet, if any
		if (type.Facets.TryGetValue(facetName, false, out var facet) && facet.Value != null && !facet.IsUnbounded)
		{
			return (T)facet.Value;
		}
		else
		{
			return defaultValue;
		}
	}

	internal static bool IsFacetValueConstant(TypeUsage type, string facetName)
	{
		return MetadataHelpers.GetFacet(((PrimitiveType)type.EdmType).FacetDescriptions, facetName).IsConstant;
	}

	private static FacetDescription GetFacet(IEnumerable<FacetDescription> facetCollection, string facetName)
	{
		foreach (var facetDescription in facetCollection)
		{
			if (facetDescription.FacetName == facetName)
			{
				return facetDescription;
			}
		}

		return null;
	}

	/// <summary>
	/// Given a facet name and an EdmType, tries to get that facet's description.
	/// </summary>
	/// <param name="edmType"></param>
	/// <param name="facetName"></param>
	/// <param name="facetDescription"></param>
	/// <returns></returns>
	internal static bool TryGetTypeFacetDescriptionByName(EdmType edmType, string facetName, out FacetDescription facetDescription)
	{
		facetDescription = null;
		if (MetadataHelpers.IsPrimitiveType(edmType))
		{
			var primitiveType = (PrimitiveType)edmType;
			foreach (var fd in primitiveType.FacetDescriptions)
			{
				if (facetName.Equals(fd.FacetName, StringComparison.OrdinalIgnoreCase))
				{
					facetDescription = fd;
					return true;
				}
			}
		}
		return false;
	}

	internal static bool IsNullable(TypeUsage type)
	{
		if (type.Facets.TryGetValue(NullableFacetName, false, out var nullableFacet))
		{
			return (bool)nullableFacet.Value;
		}
		return false;
	}

	internal static bool TryGetMaxLength(TypeUsage type, out int? maxLength)
	{
		if (!IsPrimitiveType(type, PrimitiveTypeKind.String) &&
			!IsPrimitiveType(type, PrimitiveTypeKind.Binary))
		{
			maxLength = 0;
			return false;
		}

		// Binary and String FixedLength facets share the same name
		return TryGetIntFacetValue(type, MaxLengthFacetName, out maxLength);
	}

	internal static bool TryGetIntFacetValue(TypeUsage type, string facetName, out int? intValue)
	{
		intValue = 0;

		if (type.Facets.TryGetValue(facetName, false, out var intFacet) && intFacet.Value != null)
		{
			if (!intFacet.IsUnbounded)
				intValue = (int)intFacet.Value;
			else
				intValue = default;
			return true;
		}

		return false;
	}

	internal static bool TryGetIsFixedLength(TypeUsage type, out bool isFixedLength)
	{
		if (!IsPrimitiveType(type, PrimitiveTypeKind.String) &&
			!IsPrimitiveType(type, PrimitiveTypeKind.Binary))
		{
			isFixedLength = false;
			return false;
		}

		// Binary and String MaxLength facets share the same name
		return TryGetBooleanFacetValue(type, FixedLengthFacetName, out isFixedLength);
	}

	internal static bool TryGetBooleanFacetValue(TypeUsage type, string facetName, out bool boolValue)
	{
		boolValue = false;
		if (type.Facets.TryGetValue(facetName, false, out var boolFacet) && boolFacet.Value != null)
		{
			boolValue = (bool)boolFacet.Value;
			return true;
		}

		return false;
	}

	internal static bool TryGetIsUnicode(TypeUsage type, out bool isUnicode)
	{
		if (!IsPrimitiveType(type, PrimitiveTypeKind.String))
		{
			isUnicode = false;
			return false;
		}

		return TryGetBooleanFacetValue(type, UnicodeFacetName, out isUnicode);
	}

	#endregion

	#endregion

	internal static bool IsCanonicalFunction(EdmFunction function)
	{
		return (function.NamespaceName == "Edm");
	}

	internal static bool IsStoreFunction(EdmFunction function)
	{
		return !IsCanonicalFunction(function);
	}

	// Returns ParameterDirection corresponding to given ParameterMode
	internal static ParameterDirection ParameterModeToParameterDirection(ParameterMode mode)
	{
		switch (mode)
		{
			case ParameterMode.In:
				return ParameterDirection.Input;

			case ParameterMode.InOut:
				return ParameterDirection.InputOutput;

			case ParameterMode.Out:
				return ParameterDirection.Output;

			case ParameterMode.ReturnValue:
				return ParameterDirection.ReturnValue;

			default:
				Debug.Fail("unrecognized mode " + mode.ToString());
				return default;
		}
	}

	internal static string GetTableName(EntitySetBase entitySetBase)
	{
		var tableName = MetadataHelpers.TryGetValueForMetadataProperty<string>(entitySetBase, "Table");
		return !string.IsNullOrEmpty(tableName)
			? tableName
			: entitySetBase.Name;
	}

	private static bool IsStoreGeneratedPattern(EdmMember member, StoreGeneratedPattern pattern)
	{
		return (member.TypeUsage.Facets.TryGetValue(StoreGeneratedPatternFacetName, false, out var item) && ((StoreGeneratedPattern)item.Value) == pattern);
	}
	internal static bool IsStoreGeneratedComputed(EdmMember member)
	{
		return IsStoreGeneratedPattern(member, StoreGeneratedPattern.Computed);
	}
	internal static bool IsStoreGeneratedIdentity(EdmMember member)
	{
		return IsStoreGeneratedPattern(member, StoreGeneratedPattern.Identity);
	}
	internal static bool IsStoreGenerated(EdmMember member)
	{
		return IsStoreGeneratedComputed(member) || IsStoreGeneratedIdentity(member);
	}
}


================================================
FILE: src/EntityFramework.Firebird/Resources/ProviderManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<ProviderManifest Namespace="FirebirdClient" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/providermanifest">
  <Types>
    <Type Name="smallint" PrimitiveTypeKind="Int16">
    </Type>
    <Type Name="int" PrimitiveTypeKind="Int32">
    </Type>
    <Type Name="bigint" PrimitiveTypeKind="Int64">
    </Type>
    <Type Name="float" PrimitiveTypeKind="Single">
    </Type>
    <Type Name="double" PrimitiveTypeKind="Double">
    </Type>
    <Type Name="decimal" PrimitiveTypeKind="Decimal">
      <FacetDescriptions>
        <Precision Minimum="1" Maximum="18" DefaultValue="9" Constant="false" />
        <Scale Minimum="0" Maximum="18" DefaultValue="0" Constant="false" />
      </FacetDescriptions>
    </Type>
    <Type Name="numeric" PrimitiveTypeKind="Decimal">
      <FacetDescriptions>
        <Precision Minimum="1" Maximum="18" DefaultValue="9" Constant="false" />
        <Scale Minimum="0" Maximum="18" DefaultValue="0" Constant="false" />
      </FacetDescriptions>
    </Type>
    <Type Name="timestamp" PrimitiveTypeKind="DateTime">
      <FacetDescriptions>
        <Precision DefaultValue="4" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="date" PrimitiveTypeKind="DateTime">
      <FacetDescriptions>
        <Precision DefaultValue="0" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="time" PrimitiveTypeKind="Time">
      <FacetDescriptions>
        <Precision DefaultValue="4" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="smallint_bool" PrimitiveTypeKind="Boolean">
    </Type>
    <Type Name="char" PrimitiveTypeKind="String">
      <FacetDescriptions>
        <MaxLength Minimum="1" Maximum="32765" DefaultValue="32765" Constant="false" />
        <Unicode DefaultValue="false" Constant="false" />
        <FixedLength DefaultValue="true" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="varchar" PrimitiveTypeKind="String">
      <FacetDescriptions>
        <MaxLength Minimum="1" Maximum="32765" DefaultValue="32765" Constant="false" />
        <Unicode DefaultValue="true" Constant="false" />
        <FixedLength DefaultValue="false" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="blob" PrimitiveTypeKind="Binary">
      <FacetDescriptions>
        <MaxLength DefaultValue="2147483647" Constant="true" />
        <FixedLength DefaultValue="false" Constant="true" />
      </FacetDescriptions>
    </Type>
    <Type Name="clob" PrimitiveTypeKind="String">
      <FacetDescriptions>
        <MaxLength DefaultValue="2147483647" Constant="true" />
        <Unicode DefaultValue="true" Constant="false" />
        <FixedLength DefaultValue="false" Constant="true" />
      </FacetDescriptions>
    </Type>
		<Type Name="guid" PrimitiveTypeKind="Guid">
		</Type>
  </Types>
  <Functions>
    <!-- BEGIN SYSTEM FUNCTIONS ##################################### -->
    <!-- CURRENT_TIMESTAMP -->
    <Function Name="CURRENT_TIMESTAMP" BuiltIn="true" NiladicFunction="true">
      <ReturnType Type="DateTime" />
    </Function>
    
    <!-- CURRENT_DATE -->
    <Function Name="CURRENT_DATE" BuiltIn="true" NiladicFunction="true">
      <ReturnType Type="DateTime" />
    </Function>

    <!-- CURRENT_USER -->
    <Function Name="CURRENT_USER" BuiltIn="true" NiladicFunction="true">
      <ReturnType Type="String" Unicode="false" />
    </Function>
    <!-- END SYSTEM FUNCTIONS ####################################### -->
  </Functions>
</ProviderManifest>


================================================
FILE: src/EntityFramework.Firebird/Resources/StoreSchemaDefinition.ssdl
================================================
<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="FirebirdClient_EF" Provider="FirebirdSql.Data.FirebirdClient" ProviderManifestToken="Firebird" Alias="Self" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl">
  <EntityContainer Name="Schema">
    <EntitySet Name="STables" EntityType="Self.Table">
      <DefiningQuery>
        -- STables
        SELECT
        TRIM(rdb$relation_name) as "Id"
        , 'Firebird' as "CatalogName"
        , 'Firebird' as "SchemaName" 
        , TRIM(rdb$relation_name) as "Name"
        FROM
        rdb$relations
        WHERE
        rdb$view_source IS NULL AND rdb$system_flag = 0
      </DefiningQuery>
    </EntitySet>    
    <EntitySet Name="STableColumns" EntityType="Self.TableColumn">
      <DefiningQuery>
        -- STableColumns
        SELECT TRIM(rf.rdb$relation_name) || 'x' || TRIM(rf.rdb$field_name) as "Id"
        , TRIM(rf.rdb$relation_name) as "ParentId"
        , TRIM(rf.rdb$field_name) as "Name"
        , rf.rdb$field_position+1 as "Ordinal"
        , IIF(COALESCE(rf.rdb$null_flag, f.rdb$null_flag) IS NULL, 1, 0) as "IsNullable"
        , TRIM(CASE
        WHEN POSITION('#BOOL#', UPPER(rf.rdb$description)) &gt; 0 THEN 'smallint_bool'
        WHEN POSITION('#GUID#', UPPER(rf.rdb$description)) &gt; 0 THEN 'guid'
        ELSE CASE f.rdb$field_type
          WHEN 7 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'smallint'
            END
          WHEN 8 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'int'
            END
          WHEN 16 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'bigint'
            END
          WHEN 10 THEN 'float'
          WHEN 27 THEN 'double'
          WHEN 12 THEN 'date'
          WHEN 13 THEN 'time'
          WHEN 35 THEN 'timestamp'
          WHEN 261 THEN CASE f.rdb$field_sub_type
            WHEN 1 THEN 'clob'
            ELSE 'blob'
            END
          WHEN 37 THEN 'varchar'
          WHEN 14 THEN 'char'
          WHEN 40 THEN 'cstring'
          END
        END) as "TypeName"
        , IIF(f.rdb$character_length = 0, 32765, f.rdb$character_length) as "MaxLength" --hot fix for CORE-2228
        , IIF(f.rdb$field_precision = 0 AND f.rdb$field_scale &lt; 0, 18, f.rdb$field_precision) as "Precision"
				, 4 as "DateTimePrecision"
				, f.rdb$field_scale * (-1) as "Scale"
				, NULL as "CollationCatalog"
				, NULL as "CollationSchema"
				, NULL as "CollationName"
				, NULL as "CharacterSetCatalog"
				, NULL as "CharacterSetSchema"
				, NULL as "CharacterSetName"
				, 0 as "IsMultiSet"
				, IIF(POSITION('#PK_GEN#', UPPER(rf.rdb$description)) &gt; 0, 1, 0) as "IsIdentity"
        , IIF(f.rdb$computed_blr IS NULL, 0, 1) as "IsStoreGenerated"
        , COALESCE(rf.rdb$default_source, f.rdb$default_source) as "Default"
        FROM
        rdb$relation_fields rf
        INNER JOIN rdb$fields f ON (rf.rdb$field_source = f.rdb$field_name)
        INNER JOIN rdb$relations r ON (rf.rdb$relation_name = r.rdb$relation_name)
        WHERE
        rf.rdb$system_flag = 0 AND r.rdb$view_blr IS NULL
      </DefiningQuery>
    </EntitySet>

    <EntitySet Name="SViews" EntityType="Self.View">
      <DefiningQuery>
        -- SViews
        SELECT
        TRIM(rdb$relation_name) as "Id"
        , 'Firebird' as "CatalogName"
        , 'Firebird' as "SchemaName"
        , TRIM(rdb$relation_name) as "Name"
        , rdb$view_source as "ViewDefinition"
        , 1 as "IsUpdatable"
        FROM
        rdb$relations
        WHERE
        rdb$view_blr IS NOT NULL AND rdb$system_flag = 0
      </DefiningQuery>
    </EntitySet>   
    <EntitySet Name="SViewColumns" EntityType="Self.ViewColumn">
      <DefiningQuery>
        -- SViewColumns
        SELECT TRIM(rf.rdb$relation_name) || 'x' || TRIM(rf.rdb$field_name) as "Id"
        , TRIM(rf.rdb$relation_name) as "ParentId"
        , TRIM(rf.rdb$field_name) as "Name"
        , rf.rdb$field_position+1 as "Ordinal"
        , IIF(COALESCE(rf.rdb$null_flag, f.rdb$null_flag) IS NULL, 1, 0) as "IsNullable"
        , TRIM(CASE
        WHEN POSITION('#BOOL#', UPPER(rf.rdb$description)) &gt; 0 THEN 'smallint_bool'
        WHEN POSITION('#GUID#', UPPER(rf.rdb$description)) &gt; 0 THEN 'guid'
        ELSE CASE f.rdb$field_type
          WHEN 7 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'smallint'
            END
          WHEN 8 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'int'
            END
          WHEN 16 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'bigint'
            END
          WHEN 10 THEN 'float'
          WHEN 27 THEN 'double'
          WHEN 12 THEN 'date'
          WHEN 13 THEN 'time'
          WHEN 35 THEN 'timestamp'
          WHEN 261 THEN CASE f.rdb$field_sub_type
            WHEN 1 THEN 'clob'
            ELSE 'blob'
            END
          WHEN 37 THEN 'varchar'
          WHEN 14 THEN 'char'
          WHEN 40 THEN 'cstring'
          END
        END) as "TypeName"
        , IIF(f.rdb$character_length = 0, 32765, f.rdb$character_length) as "MaxLength" --hot fix for CORE-2228
        , IIF(f.rdb$field_precision = 0 AND f.rdb$field_scale &lt; 0, 18, f.rdb$field_precision) as "Precision"
        , 4 as "DateTimePrecision"
        , f.rdb$field_scale * (-1) as "Scale"
        , NULL as "CollationCatalog"
        , NULL as "CollationSchema"
        , NULL as "CollationName"
        , NULL as "CharacterSetCatalog"
        , NULL as "CharacterSetSchema"
        , NULL as "CharacterSetName"
        , 0 as "IsMultiSet"
        , IIF(POSITION('#PK_GEN#', UPPER(rf.rdb$description)) &gt; 0, 1, 0) as "IsIdentity"
        , IIF(f.rdb$computed_blr IS NULL, 0, 1) as "IsStoreGenerated"
        , COALESCE(rf.rdb$default_source, f.rdb$default_source) as "Default"
        FROM
        rdb$relation_fields rf
        INNER JOIN rdb$fields f ON (rf.rdb$field_source = f.rdb$field_name)
        INNER JOIN rdb$relations r ON (rf.rdb$relation_name = r.rdb$relation_name)
        WHERE
        rf.rdb$system_flag = 0 AND r.rdb$view_blr IS NOT NULL
      </DefiningQuery>
    </EntitySet>

    <EntitySet Name="SFunctions" EntityType="Self.Function">
      <DefiningQuery>
        -- SFunctions
        SELECT
        TRIM(f.rdb$function_name) as "Id"
        , 'Firebird' as "CatalogName"
        , 'Firebird' as "SchemaName"
        , TRIM(f.rdb$function_name) as "Name"
        , TRIM(/*CASE 
        WHEN POSITION('#BOOL#', UPPER(fa.rdb$description)) &gt; 0 THEN 'smallint_bool'
        WHEN POSITION('#GUID#', UPPER(fa.rdb$description)) &gt; 0 THEN 'guid'
        ELSE*/ CASE fa.rdb$field_type
          WHEN 7 THEN CASE
            WHEN ((fa.rdb$field_sub_type = 2) OR (fa.rdb$field_sub_type = 0 AND fa.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN fa.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'smallint'
            END
          WHEN 8 THEN CASE
            WHEN ((fa.rdb$field_sub_type = 2) OR (fa.rdb$field_sub_type = 0 AND fa.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN fa.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'int'
            END
          WHEN 16 THEN CASE
            WHEN ((fa.rdb$field_sub_type = 2) OR (fa.rdb$field_sub_type = 0 AND fa.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN fa.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'bigint'
            END
          WHEN 10 THEN 'float'
          WHEN 27 THEN 'double'
          WHEN 12 THEN 'date'
          WHEN 13 THEN 'time'
          WHEN 35 THEN 'timestamp'
          WHEN 261 THEN CASE fa.rdb$field_sub_type
            WHEN 1 THEN 'clob'
            ELSE 'blob'
            END
          WHEN 37 THEN 'varchar'
          WHEN 14 THEN 'char'
          WHEN 40 THEN 'cstring'
          /*END*/
        END) as "ReturnTypeName"
        , fa.rdb$character_length as "ReturnMaxLength"
				, IIF(fa.rdb$field_precision = 0 AND fa.rdb$field_scale &lt; 0, 18, fa.rdb$field_precision) as "ReturnPrecision"
				, 4 as "ReturnDateTimePrecision"
				, fa.rdb$field_scale * (-1) as "ReturnScale"
				, NULL as "ReturnCollationCatalog"
				, NULL as "ReturnCollationSchema"
				, NULL as "ReturnCollationName"
				, NULL as "ReturnCharacterSetCatalog"
				, NULL as "ReturnCharacterSetSchema"
				, NULL as "ReturnCharacterSetName"
				, 0 as "ReturnIsMultiSet"
				, 0 as "IsAggregate"
				, 0 as "IsBuiltIn"
				, 0 as "IsNiladic" --CAST((select CASE COUNT(*) WHEN 1 THEN 1 ELSE 0 END FROM rdb$function_arguments fa WHERE fa.rdb$function_name = f.rdb$function_name) as smallint) as "IsNiladic"
				FROM
				rdb$functions f INNER JOIN rdb$function_arguments fa ON (f.rdb$function_name = fa.rdb$function_name AND f.rdb$return_argument = fa.rdb$argument_position)
				WHERE f.rdb$system_flag = 0
			</DefiningQuery>
    </EntitySet>
    <EntitySet Name="SFunctionParameters" EntityType="Self.Parameter">
      <DefiningQuery>
        -- SFunctionParameters
        SELECT
        TRIM(fa.rdb$function_name) || 'x' || TRIM(fa.rdb$argument_position) as "Id"
        , TRIM(fa.rdb$function_name) as "ParentId"
        , 'param' || TRIM(fa.rdb$argument_position) as "Name"
        , fa.rdb$argument_position as "Ordinal"
        , TRIM(/*CASE 
        WHEN POSITION('#BOOL#', UPPER(fa.rdb$description)) &gt; 0 THEN 'smallint_bool'
        WHEN POSITION('#GUID#', UPPER(fa.rdb$description)) &gt; 0 THEN 'guid'
        ELSE*/ CASE fa.rdb$field_type
          WHEN 7 THEN CASE
            WHEN ((fa.rdb$field_sub_type = 2) OR (fa.rdb$field_sub_type = 0 AND fa.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN fa.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'smallint'
            END
          WHEN 8 THEN CASE
            WHEN ((fa.rdb$field_sub_type = 2) OR (fa.rdb$field_sub_type = 0 AND fa.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN fa.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'int'
            END
          WHEN 16 THEN CASE
            WHEN ((fa.rdb$field_sub_type = 2) OR (fa.rdb$field_sub_type = 0 AND fa.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN fa.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'bigint'
            END
          WHEN 10 THEN 'float'
          WHEN 27 THEN 'double'
          WHEN 12 THEN 'date'
          WHEN 13 THEN 'time'
          WHEN 35 THEN 'timestamp'
          WHEN 261 THEN CASE fa.rdb$field_sub_type
            WHEN 1 THEN 'clob'
            ELSE 'blob'
            END
          WHEN 37 THEN 'varchar'
          WHEN 14 THEN 'char'
          WHEN 40 THEN 'cstring'
          /*END*/
        END) as "TypeName"
        , fa.rdb$character_length as "MaxLength"
        , IIF(fa.rdb$field_precision = 0 AND fa.rdb$field_scale &lt; 0, 18, fa.rdb$field_precision) as "Precision"
        , 4 as "DateTimePrecision"
        , fa.rdb$field_scale * (-1) as "Scale"
        , NULL as "CollationCatalog"
        , NULL as "CollationSchema"
        , NULL as "CollationName"
        , NULL as "CharacterSetCatalog"
        , NULL as "CharacterSetSchema"
        , NULL as "CharacterSetName"
        , 0 as "IsMultiSet"
        , 'IN' as "Mode"
        , NULL as "Default"
        FROM
        rdb$functions f INNER JOIN rdb$function_arguments fa ON (f.rdb$function_name = fa.rdb$function_name AND f.rdb$return_argument &lt;&gt; fa.rdb$argument_position)
        WHERE f.rdb$system_flag = 0
      </DefiningQuery>
    </EntitySet>

    <EntitySet Name="SProcedures" EntityType="Self.Procedure">
      <DefiningQuery>
        -- SProcedures
        SELECT
        TRIM(rdb$procedure_name) as "Id"
        , 'Firebird' as "CatalogName"
        , 'Firebird' as "SchemaName"
        , TRIM(rdb$procedure_name) as "Name"
        FROM
        rdb$procedures
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SProcedureParameters" EntityType="Self.Parameter">
      <DefiningQuery>
        -- SProcedureParameters
        SELECT
        TRIM(pp.rdb$procedure_name) || 'x' || TRIM(pp.rdb$parameter_name) as "Id"
        , TRIM(pp.rdb$procedure_name) as "ParentId"
        , TRIM(pp.rdb$parameter_name) as "Name"
        , pp.rdb$parameter_number+1 as "Ordinal"
        , TRIM(CASE
        WHEN POSITION('#BOOL#', UPPER(pp.rdb$description)) &gt; 0 THEN 'smallint_bool'
        WHEN POSITION('#GUID#', UPPER(pp.rdb$description)) &gt; 0 THEN 'guid'
        ELSE CASE f.rdb$field_type
          WHEN 7 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'smallint'
            END
          WHEN 8 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'int'
            END
          WHEN 16 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'bigint'
            END
          WHEN 10 THEN 'float'
          WHEN 27 THEN 'double'
          WHEN 12 THEN 'date'
          WHEN 13 THEN 'time'
          WHEN 35 THEN 'timestamp'
          WHEN 261 THEN CASE f.rdb$field_sub_type
            WHEN 1 THEN 'clob'
            ELSE 'blob'
            END
          WHEN 37 THEN 'varchar'
          WHEN 14 THEN 'char'
          WHEN 40 THEN 'cstring'
          END
        END) as "TypeName"
        , IIF(f.rdb$character_length = 0, 32765, f.rdb$character_length) as "MaxLength" --hot fix for CORE-2228
        , IIF(f.rdb$field_precision = 0 AND f.rdb$field_scale &lt; 0, 18, f.rdb$field_precision) as "Precision"
        , 4 as "DateTimePrecision"
        , f.rdb$field_scale * (-1) as "Scale"
        , NULL as "CollationCatalog"
        , NULL as "CollationSchema"
        , NULL "CollationName"
        , NULL as "CharacterSetCatalog"
        , NULL as "CharacterSetSchema"
        , NULL as "CharacterSetName"
        , 0 as "IsMultiSet"
        , TRIM(IIF(pp.rdb$parameter_type = 1, 'OUT', 'IN')) as "Mode"
        , NULL as "Default"
        FROM
        rdb$procedure_parameters pp INNER JOIN rdb$fields f ON (pp.rdb$field_source = f.rdb$field_name)
        WHERE pp.rdb$parameter_type = 0 --Out params in EF are not results
      </DefiningQuery>
    </EntitySet>

    <EntitySet Name="SConstraints" EntityType="Self.Constraint">
      <DefiningQuery>
        -- SConstraints
        SELECT
        TRIM(rc.rdb$constraint_name) as "Id"
        , TRIM(rc.rdb$relation_name) as "ParentId"
        , TRIM(rc.rdb$constraint_name) as "Name"
        , TRIM(rc.rdb$constraint_type) as "ConstraintType"
        , 0 as "IsDeferrable"
        , 0 "IsInitiallyDeferred"
        FROM
        rdb$relation_constraints rc
        WHERE
        rc.rdb$constraint_type IN ('PRIMARY KEY', 'FOREIGN KEY', 'UNIQUE')
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SCheckConstraints" EntityType="Self.CheckConstraint">
      <DefiningQuery>
        -- SCheckConstraints
        SELECT
        TRIM(rc.rdb$constraint_name) as "Id"
        , TRIM(SUBSTRING(trg.rdb$trigger_source from 6)) as "Expression"
        FROM
        rdb$relation_constraints rc
        INNER JOIN rdb$check_constraints cc on (rc.rdb$constraint_name = cc.rdb$constraint_name)
        LEFT JOIN rdb$triggers trg on (cc.rdb$trigger_name = trg.rdb$trigger_name)
        WHERE
        rc.rdb$constraint_type IN ('CHECK')
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SConstraintColumns" EntityType="Self.ConstraintColumn">
      <DefiningQuery>
        -- SConstraintColumns
        SELECT
        TRIM(rc.rdb$constraint_name) as "ConstraintId"
        , TRIM(rc.rdb$relation_name) || 'x' || TRIM(ise.rdb$field_name) as "ColumnId"
        FROM
        rdb$relation_constraints rc INNER JOIN rdb$index_segments ise ON (rc.rdb$index_name = ise.rdb$index_name)
        WHERE
        rc.rdb$constraint_type IN ('PRIMARY KEY', 'FOREIGN KEY', 'UNIQUE')
      </DefiningQuery>
    </EntitySet>
    
    <EntitySet Name="SForeignKeyConstraints" EntityType="Self.ForeignKeyConstraint">
      <DefiningQuery>
        -- SForeignKeyConstraints
        SELECT
        TRIM(rc.rdb$constraint_name) as "Id"
        , rc.rdb$update_rule "UpdateRule"
        , rc.rdb$delete_rule "DeleteRule"
        FROM
        rdb$ref_constraints rc
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SForeignKeys" EntityType="Self.ForeignKey">
      <DefiningQuery>
        -- SForeignKeys
        SELECT
        TRIM(refc.rdb$constraint_name) || 'x' || TRIM(is2.rdb$field_position+1) as "Id"
        , TRIM(relc1.rdb$relation_name) || 'x' || TRIM(is1.rdb$field_name) as "FromColumnId"
        , TRIM(relc2.rdb$relation_name) || 'x' || TRIM(is2.rdb$field_name) as "ToColumnId"
        , TRIM(refc.rdb$constraint_name) as "ConstraintId"
        , is2.rdb$field_position+1 as "Ordinal"
        FROM rdb$ref_constraints refc
        LEFT JOIN rdb$relation_constraints relc1 ON (refc.rdb$constraint_name = relc1.rdb$constraint_name)
        INNER JOIN rdb$index_segments is1 ON (relc1.rdb$index_name = is1.rdb$index_name)
        LEFT JOIN rdb$relation_constraints relc2 ON (refc.rdb$const_name_uq = relc2.rdb$constraint_name)
        INNER JOIN rdb$index_segments is2 ON (relc2.rdb$index_name = is2.rdb$index_name)
        WHERE is1.rdb$field_position = is2.rdb$field_position
      </DefiningQuery>
    </EntitySet>

    <EntitySet Name="SViewConstraints" EntityType="Self.ViewConstraint">
      <DefiningQuery>
        -- SViewConstraints
        SELECT
        CAST(NULL as varchar(1)) as "Id"
        , CAST(NULL as varchar(1)) as "ParentId"
        , CAST(NULL as varchar(1)) as "Name"
        , CAST(NULL as varchar(1)) as "ConstraintType"
        , CAST(0 as smallint) as "IsDeferrable"
        , CAST(0 as smallint) as "IsInitiallyDeferred"
        , CAST(NULL as varchar(1)) as "Expression"
        , CAST(NULL as varchar(1)) as "UpdateRule"
        , CAST(NULL as varchar(1)) as "DeleteRule"
        FROM rdb$database
        WHERE 0=1
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SViewConstraintColumns" EntityType="Self.ConstraintColumn">
      <DefiningQuery>
        -- SViewConstraintColumns
        SELECT
        CAST(NULL as varchar(1)) as "ConstraintId"
        , CAST(NULL as varchar(1)) as "ColumnId"
        FROM rdb$database
        WHERE 0=1
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SViewForeignKeys" EntityType="Self.ForeignKey">
      <DefiningQuery>
        -- SViewForeignKeys
        SELECT
        CAST(NULL as varchar(1)) as "Id"
        , CAST(NULL as varchar(1)) as "ToColumnId"
        , CAST(NULL as varchar(1)) as "FromColumnId"
        , CAST(NULL as varchar(1)) as "ConstraintId"
        , 0 as "Ordinal"
        FROM rdb$database
        WHERE 0=1
      </DefiningQuery>
    </EntitySet>

    <AssociationSet Name="STableTableColumns" Association="Self.TableTableColumn">
      <End Role="Parent" EntitySet="STables" />
      <End Role="Column" EntitySet="STableColumns" />
    </AssociationSet>
    <AssociationSet Name="STableConstraints" Association="Self.TableTableConstraint">
      <End Role="Parent" EntitySet="STables" />
      <End Role="Constraint" EntitySet="SConstraints" />
    </AssociationSet>
    <AssociationSet Name="SConstraintConstraintColumns" Association="Self.ConstraintConstraintColumn">
      <End Role="ConstraintColumn" EntitySet="SConstraintColumns" />
      <End Role="Constraint" EntitySet="SConstraints" />
    </AssociationSet>
    <AssociationSet Name="SConstraintForeignKeys" Association="Self.ConstraintForeignKey">
      <End Role="ForeignKey" EntitySet="SForeignKeys" />
      <End Role="Constraint" EntitySet="SForeignKeyConstraints" />
    </AssociationSet>
    <AssociationSet Name="SFromForeignKeyColumns" Association="Self.FromForeignKeyColumn">
      <End Role="ForeignKey" EntitySet="SForeignKeys" />
      <End Role="Column" EntitySet="STableColumns" />
    </AssociationSet>
    <AssociationSet Name="SToForeignKeyColumns" Association="Self.ToForeignKeyColumn">
      <End Role="ForeignKey" EntitySet="SForeignKeys" />
      <End Role="Column" EntitySet="STableColumns" />
    </AssociationSet>

    <AssociationSet Name="SViewViewColumns" Association="Self.ViewViewColumn">
      <End Role="Parent" EntitySet="SViews" />
      <End Role="Column" EntitySet="SViewColumns" />
    </AssociationSet>
    <AssociationSet Name="SViewViewConstraints" Association="Self.ViewViewConstraint">
      <End Role="Parent" EntitySet="SViews" />
      <End Role="Constraint" EntitySet="SViewConstraints" />
    </AssociationSet>
    <AssociationSet Name="SViewConstraintConstraintColumns" Association="Self.ViewConstraintConstraintColumn">
      <End Role="ConstraintColumn" EntitySet="SViewConstraintColumns" />
      <End Role="Constraint" EntitySet="SViewConstraints" />
    </AssociationSet>
    <AssociationSet Name="SViewConstraintForeignKeys" Association="Self.ViewConstraintForeignKey">
      <End Role="ForeignKey" EntitySet="SViewForeignKeys" />
      <End Role="Constraint" EntitySet="SViewConstraints" />
    </AssociationSet>
    <AssociationSet Name="SFromForeignKeyViewColumns" Association="Self.FromForeignKeyViewColumn">
      <End Role="ForeignKey" EntitySet="SViewForeignKeys" />
      <End Role="Column" EntitySet="SViewColumns" />
    </AssociationSet>
    <AssociationSet Name="SToForeignKeyViewColumns" Association="Self.ToForeignKeyViewColumn">
      <End Role="ForeignKey" EntitySet="SViewForeignKeys" />
      <End Role="Column" EntitySet="SViewColumns" />
    </AssociationSet>

    <AssociationSet Name="FunctionFunctionParameters" Association="Self.FunctionFunctionParameter">
      <End Role="Function" EntitySet="SFunctions" />
      <End Role="Parameter" EntitySet="SFunctionParameters" />
    </AssociationSet>
    <AssociationSet Name="ProcedureProcedureParameters" Association="Self.ProcedureProcedureParameter">
      <End Role="Procedure" EntitySet="SProcedures" />
      <End Role="Parameter" EntitySet="SProcedureParameters" />
    </AssociationSet>
    
  </EntityContainer>

  <EntityType Name="Table">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="CatalogName" Type="varchar" MaxLength="8" />
    <Property Name="SchemaName" Type="varchar" MaxLength="8" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
  </EntityType>

  <EntityType Name="TableColumn">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="63" />
    <Property Name="ParentId" Nullable="false" MaxLength="31" Type="varchar" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="Ordinal" Nullable="false" Type="int" />
    <Property Name="IsNullable" Nullable="false" Type="smallint_bool" />
    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
    <Property Name="MaxLength" Type="int" />
    <Property Name="Precision" Type="int" />
    <Property Name="DateTimePrecision" Type="int" />
    <Property Name="Scale" Type="int" />
    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
    <Property Name="CollationName" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
    <Property Name="IsMultiSet" Nullable="false" Type="smallint_bool" />
    <Property Name="IsIdentity" Nullable="false" Type="smallint_bool" />
    <Property Name="IsStoreGenerated" Nullable="false" Type="smallint_bool" />
    <Property Name="Default" Nullable="true" Type="varchar" />
  </EntityType>

  <EntityType Name="View">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="CatalogName" Type="varchar" MaxLength="8" />
    <Property Name="SchemaName" Type="varchar" MaxLength="8" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="ViewDefinition" Nullable="true" Type="varchar" />
    <Property Name="IsUpdatable" Nullable="false" Type="smallint_bool" />
  </EntityType>

  <EntityType Name="ViewColumn">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="63" />
    <Property Name="ParentId" Nullable="false" MaxLength="31" Type="varchar" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="Ordinal" Nullable="false" Type="int" />
    <Property Name="IsNullable" Nullable="false" Type="smallint_bool" />
    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
    <Property Name="MaxLength" Type="int" />
    <Property Name="Precision" Type="int" />
    <Property Name="DateTimePrecision" Type="int" />
    <Property Name="Scale" Type="int" />
    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
    <Property Name="CollationName" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
    <Property Name="IsMultiSet" Nullable="false" Type="smallint_bool" />
    <Property Name="IsIdentity" Nullable="false" Type="smallint_bool" />
    <Property Name="IsStoreGenerated" Nullable="false" Type="smallint_bool" />
    <Property Name="Default" Nullable="true" Type="varchar" />
  </EntityType>

  <EntityType Name="Function">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="CatalogName" Type="varchar" MaxLength="8" />
    <Property Name="SchemaName" Type="varchar" MaxLength="8" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="ReturnTypeName" Type="varchar" MaxLength="256" />
    <Property Name="ReturnMaxLength" Type="int" />
    <Property Name="ReturnPrecision" Type="int" />
    <Property Name="ReturnDateTimePrecision" Type="int" />
    <Property Name="ReturnScale" Type="int" />
    <Property Name="ReturnCollationCatalog" Type="varchar" MaxLength="128" />
    <Property Name="ReturnCollationSchema" Type="varchar" MaxLength="128" />
    <Property Name="ReturnCollationName" Type="varchar" MaxLength="128" />
    <Property Name="ReturnCharacterSetCatalog" Type="varchar" MaxLength="128" />
    <Property Name="ReturnCharacterSetSchema" Type="varchar" MaxLength="128" />
    <Property Name="ReturnCharacterSetName" Type="varchar" MaxLength="128" />
    <Property Name="ReturnIsMultiSet" Nullable="false" Type="smallint_bool" />
    <Property Name="IsAggregate" Type="smallint_bool" />
    <Property Name="IsBuiltIn" Type="smallint_bool" />
    <Property Name="IsNiladic" Type="smallint_bool" />
  </EntityType>

  <EntityType Name="Procedure">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="CatalogName" Type="varchar" MaxLength="8" />
    <Property Name="SchemaName" Type="varchar" MaxLength="8" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
  </EntityType>

  <EntityType Name="Parameter">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="63" />
    <Property Name="ParentId" Nullable="false" MaxLength="31" Type="varchar" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="Ordinal" Nullable="false" Type="int" />
    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
    <Property Name="MaxLength" Nullable="true" Type="int" />
    <Property Name="Precision" Nullable="true" Type="int" />
    <Property Name="DateTimePrecision" Type="int" />
    <Property Name="Scale" Nullable="true" Type="int" />
    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
    <Property Name="CollationName" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
    <Property Name="IsMultiSet" Nullable="false" Type="smallint_bool" />
    <Property Name="Mode" Type="varchar" MaxLength="16" />
    <Property Name="Default" Type="varchar" />
  </EntityType>

  <EntityType Name="Constraint">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="ParentId" Nullable="false" MaxLength="31" Type="varchar" />
    <Property Name="Name" Nullable="false" MaxLength="31" Type="varchar" />
    <Property Name="IsDeferrable" Nullable="false" Type="smallint_bool" />
    <Property Name="IsInitiallyDeferred" Nullable="false" Type="smallint_bool" />
    <Property Name="ConstraintType" Nullable="false" MaxLength="11" Type="varchar" />
  </EntityType>

  <EntityType Name="CheckConstraint">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="Expression" Nullable="true" MaxLength="1000" Type="varchar" />
  </EntityType>

  <EntityType Name="ConstraintColumn">
    <Key>
      <PropertyRef Name="ConstraintId" />
      <PropertyRef Name="ColumnId" />
    </Key>
    <Property Name="ConstraintId" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="ColumnId" Nullable="false" MaxLength="63" Type="varchar" />
  </EntityType>

  <EntityType Name="ForeignKeyConstraint">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="UpdateRule" Nullable="false" MaxLength="11" Type="varchar" />
    <Property Name="DeleteRule" Nullable="false" MaxLength="11" Type="varchar" />
  </EntityType>

  <EntityType Name="ForeignKey">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="Ordinal" Nullable="false" Type="int" />
    <Property Name="ConstraintId" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="FromColumnId" Nullable="false" MaxLength="63" Type="varchar" />
    <Property Name="ToColumnId" Nullable="false" MaxLength="63" Type="varchar" />
  </EntityType>

  <EntityType Name="ViewConstraint">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="ParentId" Nullable="false" MaxLength="31" Type="varchar" />
    <Property Name="Name" Nullable="false" MaxLength="31" Type="varchar" />
    <Property Name="IsDeferrable" Nullable="false" Type="smallint_bool" />
    <Property Name="IsInitiallyDeferred" Nullable="false" Type="smallint_bool" />
    <Property Name="ConstraintType" Nullable="false" MaxLength="11" Type="varchar" />
    <Property Name="Expression" Nullable="true" MaxLength="1000" Type="varchar" />
    <Property Name="UpdateRule" Nullable="true" MaxLength="11" Type="varchar" />
    <Property Name="DeleteRule" Nullable="true" MaxLength="11" Type="varchar" />
  </EntityType>

  <Association Name="TableTableConstraint">
    <End Type="Self.Table" Role="Parent" Multiplicity="1" />
    <End Type="Self.Constraint" Role="Constraint" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Parent">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="Constraint">
        <PropertyRef Name="ParentId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="ConstraintConstraintColumn">
    <End Type="Self.Constraint" Role="Constraint" Multiplicity="1" />
    <End Type="Self.ConstraintColumn" Role="ConstraintColumn" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Constraint">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="ConstraintColumn">
        <PropertyRef Name="ConstraintId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="ConstraintForeignKey">
    <End Type="Self.ForeignKeyConstraint" Role="Constraint" Multiplicity="1" />
    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Constraint">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="ForeignKey">
        <PropertyRef Name="ConstraintId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="FromForeignKeyColumn">
    <End Type="Self.TableColumn" Role="Column" Multiplicity="1" />
    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Column">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="ForeignKey">
        <PropertyRef Name="FromColumnId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="ToForeignKeyColumn">
    <End Type="Self.TableColumn" Role="Column" Multiplicity="1" />
    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Column">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="ForeignKey">
        <PropertyRef Name="ToColumnId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="TableTableColumn">
    <End Type="Self.Table" Role="Parent" Multiplicity="1" />
    <End Type="Self.TableColumn" Role="Column" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Parent">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="Column">
        <PropertyRef Name="ParentId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="ViewViewColumn">
    <End Type="Self.View" Role="Parent" Multiplicity="1" />
    <End Type="Self.ViewColumn" Role="Column" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Parent">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="Column">
        <PropertyRef Name="ParentId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="FunctionFunctionParameter">
    <End Type="Self.Function" Role="Function" Multiplicity="1" />
    <End Type="Self.Parameter" Role="Parameter" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Function">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="Parameter">
        <PropertyRef Name="ParentId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="ProcedureProcedureParameter">
    <End Type="Self.Procedure" Role="Procedure" Multiplicity="1" />
    <End Type="Self.Parameter" Role="Parameter" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Procedure">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="Parameter">
        <PropertyRef Name="ParentId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="ViewViewConstraint">
    <End Type="Self.View" Role="Parent" Multiplicity="1" />
    <End Type="Self.ViewConstraint" Role="Constraint" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Parent">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="Constraint">
        <PropertyRef Name="ParentId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="ViewConstraintConstraintColumn">
    <End Type="Self.ViewConstraint" Role="Constraint" Multiplicity="1" />
    <End Type="Self.ConstraintColumn" Role="ConstraintColumn" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Constraint">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="ConstraintColumn">
        <PropertyRef Name="ConstraintId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="ViewConstraintForeignKey">
    <End Type="Self.ViewConstraint" Role="Constraint" Multiplicity="1" />
    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Constraint">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="ForeignKey">
        <PropertyRef Name="ConstraintId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="FromForeignKeyViewColumn">
    <End Type="Self.ViewColumn" Role="Column" Multiplicity="1" />
    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Column">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="ForeignKey">
        <PropertyRef Name="FromColumnId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

  <Association Name="ToForeignKeyViewColumn">
    <End Type="Self.ViewColumn" Role="Column" Multiplicity="1" />
    <End Type="Self.ForeignKey" Role="ForeignKey" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Column">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="ForeignKey">
        <PropertyRef Name="ToColumnId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>

</Schema>

================================================
FILE: src/EntityFramework.Firebird/Resources/StoreSchemaDefinitionVersion3.ssdl
================================================
<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="FirebirdClient_EF" Provider="FirebirdSql.Data.FirebirdClient" ProviderManifestToken="Firebird" Alias="Self" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl">
  <EntityContainer Name="Schema">
    <EntitySet Name="STables" EntityType="Self.Table">
      <DefiningQuery>
        -- STables3
        SELECT
        TRIM(rdb$relation_name) as "Id"
        , 'Firebird' as "CatalogName"
        , 'Firebird' as "SchemaName" 
        , TRIM(rdb$relation_name) as "Name"
        FROM
        rdb$relations
        WHERE
        rdb$view_source IS NULL AND rdb$system_flag = 0
      </DefiningQuery>
    </EntitySet>    
    <EntitySet Name="STableColumns" EntityType="Self.TableColumn">
      <DefiningQuery>
        -- STableColumns3
        SELECT TRIM(rf.rdb$relation_name) || 'x' || TRIM(rf.rdb$field_name) as "Id"
        , TRIM(rf.rdb$relation_name) as "ParentId"
        , TRIM(rf.rdb$field_name) as "Name"
        , rf.rdb$field_position+1 as "Ordinal"
        , IIF(COALESCE(rf.rdb$null_flag, f.rdb$null_flag) IS NULL, 1, 0) as "IsNullable"
        , TRIM(CASE
        WHEN POSITION('#BOOL#', UPPER(rf.rdb$description)) &gt; 0 THEN 'smallint_bool'
        WHEN POSITION('#GUID#', UPPER(rf.rdb$description)) &gt; 0 THEN 'guid'
        ELSE CASE f.rdb$field_type
          WHEN 7 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'smallint'
            END
          WHEN 8 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'int'
            END
          WHEN 16 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'bigint'
            END
          WHEN 10 THEN 'float'
          WHEN 27 THEN 'double'
          WHEN 12 THEN 'date'
          WHEN 13 THEN 'time'
          WHEN 35 THEN 'timestamp'
          WHEN 261 THEN CASE f.rdb$field_sub_type
            WHEN 1 THEN 'clob'
            ELSE 'blob'
            END
          WHEN 37 THEN 'varchar'
          WHEN 14 THEN 'char'
          WHEN 40 THEN 'cstring'
          END
        END) as "TypeName"
        , IIF(f.rdb$character_length = 0, 32765, f.rdb$character_length) as "MaxLength" --hot fix for CORE-2228
        , IIF(f.rdb$field_precision = 0 AND f.rdb$field_scale &lt; 0, 18, f.rdb$field_precision) as "Precision"
				, 4 as "DateTimePrecision"
				, f.rdb$field_scale * (-1) as "Scale"
				, NULL as "CollationCatalog"
				, NULL as "CollationSchema"
				, NULL as "CollationName"
				, NULL as "CharacterSetCatalog"
				, NULL as "CharacterSetSchema"
				, NULL as "CharacterSetName"
				, 0 as "IsMultiSet"
				, IIF(POSITION('#PK_GEN#', UPPER(rf.rdb$description)) &gt; 0, 1, 0) as "IsIdentity"
        , IIF(f.rdb$computed_blr IS NULL, 0, 1) as "IsStoreGenerated"
        , COALESCE(rf.rdb$default_source, f.rdb$default_source) as "Default"
        FROM
        rdb$relation_fields rf
        INNER JOIN rdb$fields f ON (rf.rdb$field_source = f.rdb$field_name)
        INNER JOIN rdb$relations r ON (rf.rdb$relation_name = r.rdb$relation_name)
        WHERE
        rf.rdb$system_flag = 0 AND r.rdb$view_blr IS NULL
      </DefiningQuery>
    </EntitySet>

    <EntitySet Name="SViews" EntityType="Self.View">
      <DefiningQuery>
        -- SViews3
        SELECT
        TRIM(rdb$relation_name) as "Id"
        , 'Firebird' as "CatalogName"
        , 'Firebird' as "SchemaName"
        , TRIM(rdb$relation_name) as "Name"
        , rdb$view_source as "ViewDefinition"
        , 1 as "IsUpdatable"
        FROM
        rdb$relations
        WHERE
        rdb$view_blr IS NOT NULL AND rdb$system_flag = 0
      </DefiningQuery>
    </EntitySet>   
    <EntitySet Name="SViewColumns" EntityType="Self.ViewColumn">
      <DefiningQuery>
        -- SViewColumns3
        SELECT TRIM(rf.rdb$relation_name) || 'x' || TRIM(rf.rdb$field_name) as "Id"
        , TRIM(rf.rdb$relation_name) as "ParentId"
        , TRIM(rf.rdb$field_name) as "Name"
        , rf.rdb$field_position+1 as "Ordinal"
        , IIF(COALESCE(rf.rdb$null_flag, f.rdb$null_flag) IS NULL, 1, 0) as "IsNullable"
        , TRIM(CASE
        WHEN POSITION('#BOOL#', UPPER(rf.rdb$description)) &gt; 0 THEN 'smallint_bool'
        WHEN POSITION('#GUID#', UPPER(rf.rdb$description)) &gt; 0 THEN 'guid'
        ELSE CASE f.rdb$field_type
          WHEN 7 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'smallint'
            END
          WHEN 8 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'int'
            END
          WHEN 16 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'bigint'
            END
          WHEN 10 THEN 'float'
          WHEN 27 THEN 'double'
          WHEN 12 THEN 'date'
          WHEN 13 THEN 'time'
          WHEN 35 THEN 'timestamp'
          WHEN 261 THEN CASE f.rdb$field_sub_type
            WHEN 1 THEN 'clob'
            ELSE 'blob'
            END
          WHEN 37 THEN 'varchar'
          WHEN 14 THEN 'char'
          WHEN 40 THEN 'cstring'
          END
        END) as "TypeName"
        , IIF(f.rdb$character_length = 0, 32765, f.rdb$character_length) as "MaxLength" --hot fix for CORE-2228
        , IIF(f.rdb$field_precision = 0 AND f.rdb$field_scale &lt; 0, 18, f.rdb$field_precision) as "Precision"
        , 4 as "DateTimePrecision"
        , f.rdb$field_scale * (-1) as "Scale"
        , NULL as "CollationCatalog"
        , NULL as "CollationSchema"
        , NULL as "CollationName"
        , NULL as "CharacterSetCatalog"
        , NULL as "CharacterSetSchema"
        , NULL as "CharacterSetName"
        , 0 as "IsMultiSet"
        , IIF(POSITION('#PK_GEN#', UPPER(rf.rdb$description)) &gt; 0, 1, 0) as "IsIdentity"
        , IIF(f.rdb$computed_blr IS NULL, 0, 1) as "IsStoreGenerated"
        , COALESCE(rf.rdb$default_source, f.rdb$default_source) as "Default"
        FROM
        rdb$relation_fields rf
        INNER JOIN rdb$fields f ON (rf.rdb$field_source = f.rdb$field_name)
        INNER JOIN rdb$relations r ON (rf.rdb$relation_name = r.rdb$relation_name)
        WHERE
        rf.rdb$system_flag = 0 AND r.rdb$view_blr IS NOT NULL
      </DefiningQuery>
    </EntitySet>

    <EntitySet Name="SFunctions" EntityType="Self.Function">
      <DefiningQuery>
		  -- SFunctions3
		  SELECT
		  TRIM(rdb$procedure_name) as "Id"
		  , 'Firebird' as "CatalogName"
		  , 'Firebird' as "SchemaName"
		  , TRIM(rdb$procedure_name) as "Name"
		  , NULL as "ReturnTypeName"
		  , NULL as "ReturnMaxLength"
		  , NULL as "ReturnPrecision"
		  , NULL as "ReturnDateTimePrecision"
		  , NULL as "ReturnScale"
		  , NULL as "ReturnCollationCatalog"
		  , NULL as "ReturnCollationSchema"
		  , NULL as "ReturnCollationName"
		  , NULL as "ReturnCharacterSetCatalog"
		  , NULL as "ReturnCharacterSetSchema"
		  , NULL as "ReturnCharacterSetName"
		  , 0 as "ReturnIsMultiSet"
		  , 0 as "IsAggregate"
		  , 0 as "IsBuiltIn"
		  , IIF(COALESCE(rdb$procedure_inputs, 0) = 0, 1, 0) as "IsNiladic"
		  , 1 as "IsTvf"
		  FROM
		  rdb$procedures
		  WHERE
		  rdb$procedure_type = 1
	  </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SFunctionParameters" EntityType="Self.Parameter">
      <DefiningQuery>
        -- SFunctionParameters3
        SELECT
        TRIM(pp.rdb$procedure_name) || 'x' || TRIM(pp.rdb$parameter_name) as "Id"
        , TRIM(pp.rdb$procedure_name) as "ParentId"
        , TRIM(pp.rdb$parameter_name) as "Name"
        , pp.rdb$parameter_number+1 as "Ordinal"
        , TRIM(CASE
        WHEN POSITION('#BOOL#', UPPER(pp.rdb$description)) &gt; 0 THEN 'smallint_bool'
        WHEN POSITION('#GUID#', UPPER(pp.rdb$description)) &gt; 0 THEN 'guid'
        ELSE CASE f.rdb$field_type
          WHEN 7 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'smallint'
            END
          WHEN 8 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'int'
            END
          WHEN 16 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'bigint'
            END
          WHEN 10 THEN 'float'
          WHEN 27 THEN 'double'
          WHEN 12 THEN 'date'
          WHEN 13 THEN 'time'
          WHEN 35 THEN 'timestamp'
          WHEN 261 THEN CASE f.rdb$field_sub_type
            WHEN 1 THEN 'clob'
            ELSE 'blob'
            END
          WHEN 37 THEN 'varchar'
          WHEN 14 THEN 'char'
          WHEN 40 THEN 'cstring'
          END
        END) as "TypeName"
        , IIF(f.rdb$character_length = 0, 32765, f.rdb$character_length) as "MaxLength" --hot fix for CORE-2228
        , IIF(f.rdb$field_precision = 0 AND f.rdb$field_scale &lt; 0, 18, f.rdb$field_precision) as "Precision"
        , 4 as "DateTimePrecision"
        , f.rdb$field_scale * (-1) as "Scale"
        , NULL as "CollationCatalog"
        , NULL as "CollationSchema"
        , NULL "CollationName"
        , NULL as "CharacterSetCatalog"
        , NULL as "CharacterSetSchema"
        , NULL as "CharacterSetName"
        , 0 as "IsMultiSet"
        , TRIM(IIF(pp.rdb$parameter_type = 1, 'OUT', 'IN')) as "Mode"
        , NULL as "Default"
        FROM
        rdb$procedure_parameters pp INNER JOIN rdb$fields f ON (pp.rdb$field_source = f.rdb$field_name)
        WHERE pp.rdb$parameter_type = 0
      </DefiningQuery>
    </EntitySet>
	<EntitySet Name="SFunctionReturnTableColumns" EntityType="Self.FunctionReturnTableColumn">
		<DefiningQuery>
			-- SFunctionReturnTableColumns3
			SELECT
			TRIM(pp.rdb$procedure_name) || 'x' || TRIM(pp.rdb$parameter_name) as "Id"
			, TRIM(pp.rdb$procedure_name) as "ParentId"
			, TRIM(pp.rdb$parameter_name) as "Name"
			, pp.rdb$parameter_number+1 as "Ordinal"
			, IIF(f.rdb$null_flag IS NULL, 1, 0) as "IsNullable"
			, TRIM(CASE
			WHEN POSITION('#BOOL#', UPPER(pp.rdb$description)) &gt; 0 THEN 'smallint_bool'
			WHEN POSITION('#GUID#', UPPER(pp.rdb$description)) &gt; 0 THEN 'guid'
			ELSE CASE f.rdb$field_type
			  WHEN 7 THEN CASE
				WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
				WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
				ELSE 'smallint'
				END
			  WHEN 8 THEN CASE
				WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
				WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
				ELSE 'int'
				END
			  WHEN 16 THEN CASE
				WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
				WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
				ELSE 'bigint'
				END
			  WHEN 10 THEN 'float'
			  WHEN 27 THEN 'double'
			  WHEN 12 THEN 'date'
			  WHEN 13 THEN 'time'
			  WHEN 35 THEN 'timestamp'
			  WHEN 261 THEN CASE f.rdb$field_sub_type
				WHEN 1 THEN 'clob'
				ELSE 'blob'
				END
			  WHEN 37 THEN 'varchar'
			  WHEN 14 THEN 'char'
			  WHEN 40 THEN 'cstring'
			  END
			END) as "TypeName"
			, IIF(f.rdb$character_length = 0, 32765, f.rdb$character_length) as "MaxLength" --hot fix for CORE-2228
			, IIF(f.rdb$field_precision = 0 AND f.rdb$field_scale &lt; 0, 18, f.rdb$field_precision) as "Precision"
			, 4 as "DateTimePrecision"
			, f.rdb$field_scale * (-1) as "Scale"
			, NULL as "CollationCatalog"
			, NULL as "CollationSchema"
			, NULL "CollationName"
			, NULL as "CharacterSetCatalog"
			, NULL as "CharacterSetSchema"
			, NULL as "CharacterSetName"
			, 0 as "IsMultiSet"
			, 0 as "IsIdentity"
			, 0 as "IsStoreGenerated"
			, NULL as "Default"
			FROM
			rdb$procedure_parameters pp INNER JOIN rdb$fields f ON (pp.rdb$field_source = f.rdb$field_name)
			WHERE pp.rdb$parameter_type = 1
		</DefiningQuery>
	</EntitySet>

    <EntitySet Name="SProcedures" EntityType="Self.Procedure">
      <DefiningQuery>
        -- SProcedures3
        SELECT
        TRIM(rdb$procedure_name) as "Id"
        , 'Firebird' as "CatalogName"
        , 'Firebird' as "SchemaName"
        , TRIM(rdb$procedure_name) as "Name"
        FROM
        rdb$procedures
		WHERE
		rdb$procedure_type = 2
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SProcedureParameters" EntityType="Self.Parameter">
      <DefiningQuery>
        -- SProcedureParameters3
        SELECT
        TRIM(pp.rdb$procedure_name) || 'x' || TRIM(pp.rdb$parameter_name) as "Id"
        , TRIM(pp.rdb$procedure_name) as "ParentId"
        , TRIM(pp.rdb$parameter_name) as "Name"
        , pp.rdb$parameter_number+1 as "Ordinal"
        , TRIM(CASE
        WHEN POSITION('#BOOL#', UPPER(pp.rdb$description)) &gt; 0 THEN 'smallint_bool'
        WHEN POSITION('#GUID#', UPPER(pp.rdb$description)) &gt; 0 THEN 'guid'
        ELSE CASE f.rdb$field_type
          WHEN 7 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'smallint'
            END
          WHEN 8 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'int'
            END
          WHEN 16 THEN CASE
            WHEN ((f.rdb$field_sub_type = 2) OR (f.rdb$field_sub_type = 0 AND f.rdb$field_scale &lt; 0)) THEN 'decimal'
            WHEN f.rdb$field_sub_type = 1 THEN 'numeric'
            ELSE 'bigint'
            END
          WHEN 10 THEN 'float'
          WHEN 27 THEN 'double'
          WHEN 12 THEN 'date'
          WHEN 13 THEN 'time'
          WHEN 35 THEN 'timestamp'
          WHEN 261 THEN CASE f.rdb$field_sub_type
            WHEN 1 THEN 'clob'
            ELSE 'blob'
            END
          WHEN 37 THEN 'varchar'
          WHEN 14 THEN 'char'
          WHEN 40 THEN 'cstring'
          END
        END) as "TypeName"
        , IIF(f.rdb$character_length = 0, 32765, f.rdb$character_length) as "MaxLength" --hot fix for CORE-2228
        , IIF(f.rdb$field_precision = 0 AND f.rdb$field_scale &lt; 0, 18, f.rdb$field_precision) as "Precision"
        , 4 as "DateTimePrecision"
        , f.rdb$field_scale * (-1) as "Scale"
        , NULL as "CollationCatalog"
        , NULL as "CollationSchema"
        , NULL "CollationName"
        , NULL as "CharacterSetCatalog"
        , NULL as "CharacterSetSchema"
        , NULL as "CharacterSetName"
        , 0 as "IsMultiSet"
        , TRIM(IIF(pp.rdb$parameter_type = 1, 'OUT', 'IN')) as "Mode"
        , NULL as "Default"
        FROM
        rdb$procedure_parameters pp INNER JOIN rdb$fields f ON (pp.rdb$field_source = f.rdb$field_name)
        WHERE pp.rdb$parameter_type = 0
      </DefiningQuery>
    </EntitySet>

    <EntitySet Name="SConstraints" EntityType="Self.Constraint">
      <DefiningQuery>
        -- SConstraints3
        SELECT
        TRIM(rc.rdb$constraint_name) as "Id"
        , TRIM(rc.rdb$relation_name) as "ParentId"
        , TRIM(rc.rdb$constraint_name) as "Name"
        , TRIM(rc.rdb$constraint_type) as "ConstraintType"
        , 0 as "IsDeferrable"
        , 0 "IsInitiallyDeferred"
        FROM
        rdb$relation_constraints rc
        WHERE
        rc.rdb$constraint_type IN ('PRIMARY KEY', 'FOREIGN KEY', 'UNIQUE')
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SCheckConstraints" EntityType="Self.CheckConstraint">
      <DefiningQuery>
        -- SCheckConstraints3
        SELECT
        TRIM(rc.rdb$constraint_name) as "Id"
        , TRIM(SUBSTRING(trg.rdb$trigger_source from 6)) as "Expression"
        FROM
        rdb$relation_constraints rc
        INNER JOIN rdb$check_constraints cc on (rc.rdb$constraint_name = cc.rdb$constraint_name)
        LEFT JOIN rdb$triggers trg on (cc.rdb$trigger_name = trg.rdb$trigger_name)
        WHERE
        rc.rdb$constraint_type IN ('CHECK')
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SConstraintColumns" EntityType="Self.ConstraintColumn">
      <DefiningQuery>
        -- SConstraintColumns3
        SELECT
        TRIM(rc.rdb$constraint_name) as "ConstraintId"
        , TRIM(rc.rdb$relation_name) || 'x' || TRIM(ise.rdb$field_name) as "ColumnId"
        FROM
        rdb$relation_constraints rc INNER JOIN rdb$index_segments ise ON (rc.rdb$index_name = ise.rdb$index_name)
        WHERE
        rc.rdb$constraint_type IN ('PRIMARY KEY', 'FOREIGN KEY', 'UNIQUE')
      </DefiningQuery>
    </EntitySet>
    
    <EntitySet Name="SForeignKeyConstraints" EntityType="Self.ForeignKeyConstraint">
      <DefiningQuery>
        -- SForeignKeyConstraints3
        SELECT
        TRIM(rc.rdb$constraint_name) as "Id"
        , rc.rdb$update_rule "UpdateRule"
        , rc.rdb$delete_rule "DeleteRule"
        FROM
        rdb$ref_constraints rc
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SForeignKeys" EntityType="Self.ForeignKey">
      <DefiningQuery>
        -- SForeignKeys3
        SELECT
        TRIM(refc.rdb$constraint_name) || 'x' || TRIM(is2.rdb$field_position+1) as "Id"
        , TRIM(relc1.rdb$relation_name) || 'x' || TRIM(is1.rdb$field_name) as "FromColumnId"
        , TRIM(relc2.rdb$relation_name) || 'x' || TRIM(is2.rdb$field_name) as "ToColumnId"
        , TRIM(refc.rdb$constraint_name) as "ConstraintId"
        , is2.rdb$field_position+1 as "Ordinal"
        FROM rdb$ref_constraints refc
        LEFT JOIN rdb$relation_constraints relc1 ON (refc.rdb$constraint_name = relc1.rdb$constraint_name)
        INNER JOIN rdb$index_segments is1 ON (relc1.rdb$index_name = is1.rdb$index_name)
        LEFT JOIN rdb$relation_constraints relc2 ON (refc.rdb$const_name_uq = relc2.rdb$constraint_name)
        INNER JOIN rdb$index_segments is2 ON (relc2.rdb$index_name = is2.rdb$index_name)
        WHERE is1.rdb$field_position = is2.rdb$field_position
      </DefiningQuery>
    </EntitySet>

    <EntitySet Name="SViewConstraints" EntityType="Self.ViewConstraint">
      <DefiningQuery>
        -- SViewConstraints3
        SELECT
        CAST(NULL as varchar(1)) as "Id"
        , CAST(NULL as varchar(1)) as "ParentId"
        , CAST(NULL as varchar(1)) as "Name"
        , CAST(NULL as varchar(1)) as "ConstraintType"
        , CAST(0 as smallint) as "IsDeferrable"
        , CAST(0 as smallint) as "IsInitiallyDeferred"
        , CAST(NULL as varchar(1)) as "Expression"
        , CAST(NULL as varchar(1)) as "UpdateRule"
        , CAST(NULL as varchar(1)) as "DeleteRule"
        FROM rdb$database
        WHERE 0=1
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SViewConstraintColumns" EntityType="Self.ConstraintColumn">
      <DefiningQuery>
        -- SViewConstraintColumns3
        SELECT
        CAST(NULL as varchar(1)) as "ConstraintId"
        , CAST(NULL as varchar(1)) as "ColumnId"
        FROM rdb$database
        WHERE 0=1
      </DefiningQuery>
    </EntitySet>
    <EntitySet Name="SViewForeignKeys" EntityType="Self.ForeignKey">
      <DefiningQuery>
        -- SViewForeignKeys3
        SELECT
        CAST(NULL as varchar(1)) as "Id"
        , CAST(NULL as varchar(1)) as "ToColumnId"
        , CAST(NULL as varchar(1)) as "FromColumnId"
        , CAST(NULL as varchar(1)) as "ConstraintId"
        , 0 as "Ordinal"
        FROM rdb$database
        WHERE 0=1
      </DefiningQuery>
    </EntitySet>

	  <AssociationSet Name="STableTableColumns" Association="Self.TableTableColumn" >
		  <End Role="Parent" EntitySet="STables"/>
		  <End Role="Column" EntitySet="STableColumns"/>
	  </AssociationSet>
	  <AssociationSet Name="STableConstraints" Association="Self.TableTableConstraint" >
		  <End Role="Parent" EntitySet="STables"/>
		  <End Role="Constraint" EntitySet="SConstraints"/>
	  </AssociationSet>
	  <AssociationSet Name="SConstraintConstraintColumns" Association="Self.ConstraintConstraintColumn" >
		  <End Role="ConstraintColumn" EntitySet="SConstraintColumns"/>
		  <End Role="Constraint" EntitySet="SConstraints"/>
	  </AssociationSet>
	  <AssociationSet Name="SConstraintForeignKeys" Association="Self.ConstraintForeignKey" >
		  <End Role="ForeignKey" EntitySet="SForeignKeys"/>
		  <End Role="Constraint" EntitySet="SForeignKeyConstraints"/>
	  </AssociationSet>
	  <AssociationSet Name="SFromForeignKeyColumns" Association="Self.FromForeignKeyColumn" >
		  <End Role="ForeignKey" EntitySet="SForeignKeys"/>
		  <End Role="Column" EntitySet="STableColumns"/>
	  </AssociationSet>
	  <AssociationSet Name="SToForeignKeyColumns" Association="Self.ToForeignKeyColumn" >
		  <End Role="ForeignKey" EntitySet="SForeignKeys"/>
		  <End Role="Column" EntitySet="STableColumns"/>
	  </AssociationSet>

	  <AssociationSet Name="SViewViewColumns" Association="Self.ViewViewColumn" >
		  <End Role="Parent" EntitySet="SViews"/>
		  <End Role="Column" EntitySet="SViewColumns"/>
	  </AssociationSet>
	  <AssociationSet Name="SViewViewConstraints" Association="Self.ViewViewConstraint" >
		  <End Role="Parent" EntitySet="SViews"/>
		  <End Role="Constraint" EntitySet="SViewConstraints"/>
	  </AssociationSet>
	  <AssociationSet Name="SViewConstraintConstraintColumns" Association="Self.ViewConstraintConstraintColumn" >
		  <End Role="ConstraintColumn" EntitySet="SViewConstraintColumns"/>
		  <End Role="Constraint" EntitySet="SViewConstraints"/>
	  </AssociationSet>
	  <AssociationSet Name="SViewConstraintForeignKeys" Association="Self.ViewConstraintForeignKey" >
		  <End Role="ForeignKey" EntitySet="SViewForeignKeys"/>
		  <End Role="Constraint" EntitySet="SViewConstraints"/>
	  </AssociationSet>
	  <AssociationSet Name="SFromForeignKeyViewColumns" Association="Self.FromForeignKeyViewColumn" >
		  <End Role="ForeignKey" EntitySet="SViewForeignKeys"/>
		  <End Role="Column" EntitySet="SViewColumns"/>
	  </AssociationSet>
	  <AssociationSet Name="SToForeignKeyViewColumns" Association="Self.ToForeignKeyViewColumn" >
		  <End Role="ForeignKey" EntitySet="SViewForeignKeys"/>
		  <End Role="Column" EntitySet="SViewColumns"/>
	  </AssociationSet>

	  <AssociationSet Name="FunctionFunctionParameters" Association="Self.FunctionFunctionParameter">
		  <End Role="Function" EntitySet="SFunctions"/>
		  <End Role="Parameter" EntitySet="SFunctionParameters"/>
	  </AssociationSet>
	  <AssociationSet Name="FunctionFunctionReturnTableColumns" Association="Self.FunctionFunctionReturnTableColumn" >
		  <End Role="Function" EntitySet="SFunctions"/>
		  <End Role="Column" EntitySet="SFunctionReturnTableColumns"/>
	  </AssociationSet>
	  <AssociationSet Name="ProcedureProcedureParameters" Association="Self.ProcedureProcedureParameter" >
		  <End Role="Procedure" EntitySet="SProcedures"/>
		  <End Role="Parameter" EntitySet="SProcedureParameters"/>
	  </AssociationSet>

  </EntityContainer>

  <EntityType Name="Table">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="CatalogName" Type="varchar" MaxLength="8" />
    <Property Name="SchemaName" Type="varchar" MaxLength="8" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
  </EntityType>

  <EntityType Name="TableColumn">
	  <Key>
		  <PropertyRef Name="Id" />
	  </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="63" />
    <Property Name="ParentId" Nullable="false" MaxLength="31" Type="varchar" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="Ordinal" Nullable="false" Type="int" />
    <Property Name="IsNullable" Nullable="false" Type="smallint_bool" />
    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
    <Property Name="MaxLength" Type="int" />
    <Property Name="Precision" Type="int" />
    <Property Name="DateTimePrecision" Type="int" />
    <Property Name="Scale" Type="int" />
    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
    <Property Name="CollationName" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
    <Property Name="IsMultiSet" Nullable="false" Type="smallint_bool" />
    <Property Name="IsIdentity" Nullable="false" Type="smallint_bool" />
    <Property Name="IsStoreGenerated" Nullable="false" Type="smallint_bool" />
    <Property Name="Default" Nullable="true" Type="varchar" />
  </EntityType>

  <EntityType Name="View">
	  <Key>
		  <PropertyRef Name="Id" />
	  </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="CatalogName" Type="varchar" MaxLength="8" />
    <Property Name="SchemaName" Type="varchar" MaxLength="8" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="ViewDefinition" Nullable="true" Type="varchar" />
    <Property Name="IsUpdatable" Nullable="false" Type="smallint_bool" />
  </EntityType>

  <EntityType Name="ViewColumn">
	  <Key>
		  <PropertyRef Name="Id" />
	  </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="63" />
    <Property Name="ParentId" Nullable="false" MaxLength="31" Type="varchar" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="Ordinal" Nullable="false" Type="int" />
    <Property Name="IsNullable" Nullable="false" Type="smallint_bool" />
    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
    <Property Name="MaxLength" Type="int" />
    <Property Name="Precision" Type="int" />
    <Property Name="DateTimePrecision" Type="int" />
    <Property Name="Scale" Type="int" />
    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
    <Property Name="CollationName" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
    <Property Name="IsMultiSet" Nullable="false" Type="smallint_bool" />
    <Property Name="IsIdentity" Nullable="false" Type="smallint_bool" />
    <Property Name="IsStoreGenerated" Nullable="false" Type="smallint_bool" />
    <Property Name="Default" Nullable="true" Type="varchar" />
  </EntityType>

  <EntityType Name="Function">
	  <Key>
		  <PropertyRef Name="Id" />
	  </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="CatalogName" Type="varchar" MaxLength="8" />
    <Property Name="SchemaName" Type="varchar" MaxLength="8" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="ReturnTypeName" Type="varchar" MaxLength="256" />
    <Property Name="ReturnMaxLength" Type="int" />
    <Property Name="ReturnPrecision" Type="int" />
    <Property Name="ReturnDateTimePrecision" Type="int" />
    <Property Name="ReturnScale" Type="int" />
    <Property Name="ReturnCollationCatalog" Type="varchar" MaxLength="128" />
    <Property Name="ReturnCollationSchema" Type="varchar" MaxLength="128" />
    <Property Name="ReturnCollationName" Type="varchar" MaxLength="128" />
    <Property Name="ReturnCharacterSetCatalog" Type="varchar" MaxLength="128" />
    <Property Name="ReturnCharacterSetSchema" Type="varchar" MaxLength="128" />
    <Property Name="ReturnCharacterSetName" Type="varchar" MaxLength="128" />
    <Property Name="ReturnIsMultiSet" Type="smallint_bool" />
    <Property Name="IsAggregate" Type="smallint_bool" />
    <Property Name="IsBuiltIn" Type="smallint_bool" />
    <Property Name="IsNiladic" Type="smallint_bool" />
    <Property Name="IsTvf" Nullable="false" Type="smallint_bool" />
  </EntityType>

  <EntityType Name="Procedure">
	  <Key>
		  <PropertyRef Name="Id" />
	  </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="CatalogName" Type="varchar" MaxLength="8" />
    <Property Name="SchemaName" Type="varchar" MaxLength="8" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
  </EntityType>

  <EntityType Name="Parameter">
	  <Key>
		  <PropertyRef Name="Id" />
	  </Key>
    <Property Name="Id" Nullable="false" Type="varchar" MaxLength="63" />
    <Property Name="ParentId" Nullable="false" MaxLength="31" Type="varchar" />
    <Property Name="Name" Nullable="false" Type="varchar" MaxLength="31" />
    <Property Name="Ordinal" Nullable="false" Type="int" />
    <Property Name="TypeName" Nullable="false" Type="varchar" MaxLength="256" />
	  <Property Name="MaxLength" Nullable="true" Type="int" />
	  <Property Name="Precision" Nullable="true" Type="int" />
	  <Property Name="DateTimePrecision" Type="int" />
	  <Property Name="Scale" Nullable="true" Type="int" />
    <Property Name="CollationCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CollationSchema" Type="varchar" MaxLength="128" />
    <Property Name="CollationName" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetCatalog" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetSchema" Type="varchar" MaxLength="128" />
    <Property Name="CharacterSetName" Type="varchar" MaxLength="128" />
    <Property Name="IsMultiSet" Nullable="false" Type="smallint_bool" />
   
Download .txt
gitextract_qhgfmhye/

├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       └── ci.yml
├── .gitignore
├── CONTRIBUTING.md
├── README.md
├── build.ps1
├── docs/
│   ├── ado-net-schema.md
│   ├── ado-net.md
│   ├── batching.md
│   ├── decfloat.md
│   ├── entity-framework-6.md
│   ├── entity-framework-core.md
│   ├── events.md
│   ├── int128.md
│   ├── services-backup.md
│   └── time-zones.md
├── header.ps1
├── include.ps1
├── license.txt
├── src/
│   ├── .editorconfig
│   ├── Directory.Build.props
│   ├── EntityFramework.Firebird/
│   │   ├── App.config.install.xdt
│   │   ├── DefaultFbMigrationSqlGeneratorBehavior.cs
│   │   ├── EntityFramework.Firebird.csproj
│   │   ├── FbConnectionFactory.cs
│   │   ├── FbMigrationSqlGenerator.cs
│   │   ├── FbMigrationsTransactionsInterceptor.cs
│   │   ├── FbProviderManifest.cs
│   │   ├── FbProviderServices.cs
│   │   ├── IFbMigrationSqlGeneratorBehavior.cs
│   │   ├── MetadataHelpers.cs
│   │   ├── Properties/
│   │   │   └── EntityFramework.Firebird.snk
│   │   ├── Resources/
│   │   │   ├── ProviderManifest.xml
│   │   │   ├── StoreSchemaDefinition.ssdl
│   │   │   ├── StoreSchemaDefinitionVersion3.ssdl
│   │   │   ├── StoreSchemaMapping.msl
│   │   │   └── StoreSchemaMappingVersion3.msl
│   │   ├── SqlGen/
│   │   │   ├── DmlSqlGenerator.cs
│   │   │   ├── ExpressionTranslator.cs
│   │   │   ├── FirstClause.cs
│   │   │   ├── ISqlFragment.cs
│   │   │   ├── JoinSymbol.cs
│   │   │   ├── SkipClause.cs
│   │   │   ├── SqlBuilder.cs
│   │   │   ├── SqlGenerator.cs
│   │   │   ├── SqlSelectStatement.cs
│   │   │   ├── SqlWriter.cs
│   │   │   ├── Symbol.cs
│   │   │   ├── SymbolPair.cs
│   │   │   └── SymbolTable.cs
│   │   ├── SsdlToFb.cs
│   │   ├── TypeHelpers.cs
│   │   └── Web.config.install.xdt
│   ├── EntityFramework.Firebird.Tests/
│   │   ├── EntityFramework.Firebird.Tests.csproj
│   │   ├── EntityFrameworkTestsBase.cs
│   │   ├── FbTestDbContext.cs
│   │   ├── InfrastructureTests.cs
│   │   ├── QueryTests.cs
│   │   └── app.config
│   ├── FirebirdSql.Data.External/
│   │   ├── FirebirdSql.Data.External.projitems
│   │   ├── FirebirdSql.Data.External.shproj
│   │   ├── RC4/
│   │   │   ├── ICipherParameters.cs
│   │   │   ├── KeyParameter.cs
│   │   │   └── RC4Engine.cs
│   │   └── zlib/
│   │       ├── Deflate.cs
│   │       ├── InfTree.cs
│   │       ├── Inflate.cs
│   │       ├── Tree.cs
│   │       ├── Zlib.cs
│   │       ├── ZlibCodec.cs
│   │       └── ZlibConstants.cs
│   ├── FirebirdSql.Data.FirebirdClient/
│   │   ├── Client/
│   │   │   ├── ClientFactory.cs
│   │   │   ├── Managed/
│   │   │   │   ├── AuthBlock.cs
│   │   │   │   ├── DataProviderStreamWrapper.cs
│   │   │   │   ├── FetchResponse.cs
│   │   │   │   ├── FirebirdNetworkHandlingWrapper.cs
│   │   │   │   ├── GdsConnection.cs
│   │   │   │   ├── GenericResponse.cs
│   │   │   │   ├── IDataProvider.cs
│   │   │   │   ├── IResponse.cs
│   │   │   │   ├── ITracksIOFailure.cs
│   │   │   │   ├── IXdrReader.cs
│   │   │   │   ├── IXdrWriter.cs
│   │   │   │   ├── ProtocolsSupported.cs
│   │   │   │   ├── SqlResponse.cs
│   │   │   │   ├── Srp/
│   │   │   │   │   ├── Srp256Client.cs
│   │   │   │   │   ├── SrpClient.cs
│   │   │   │   │   └── SrpClientBase.cs
│   │   │   │   ├── Sspi/
│   │   │   │   │   └── SspiHelper.cs
│   │   │   │   ├── Version10/
│   │   │   │   │   ├── GdsArray.cs
│   │   │   │   │   ├── GdsBlob.cs
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsEventManager.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   ├── GdsStatement.cs
│   │   │   │   │   └── GdsTransaction.cs
│   │   │   │   ├── Version11/
│   │   │   │   │   ├── AuthResponse.cs
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   └── GdsStatement.cs
│   │   │   │   ├── Version12/
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   └── GdsStatement.cs
│   │   │   │   ├── Version13/
│   │   │   │   │   ├── ContAuthResponse.cs
│   │   │   │   │   ├── CryptKeyCallbackResponse.cs
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   ├── GdsStatement.cs
│   │   │   │   │   └── WireCryptOption.cs
│   │   │   │   ├── Version15/
│   │   │   │   │   ├── CryptKeyCallbackResponse.cs
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   └── GdsStatement.cs
│   │   │   │   ├── Version16/
│   │   │   │   │   ├── BatchCompletionStateResponse.cs
│   │   │   │   │   ├── GdsBatch.cs
│   │   │   │   │   ├── GdsDatabase.cs
│   │   │   │   │   ├── GdsServiceManager.cs
│   │   │   │   │   └── GdsStatement.cs
│   │   │   │   └── XdrReaderWriter.cs
│   │   │   └── Native/
│   │   │       ├── FbClientFactory.cs
│   │   │       ├── FesArray.cs
│   │   │       ├── FesBlob.cs
│   │   │       ├── FesConnection.cs
│   │   │       ├── FesDatabase.cs
│   │   │       ├── FesServiceManager.cs
│   │   │       ├── FesStatement.cs
│   │   │       ├── FesTransaction.cs
│   │   │       ├── Handles/
│   │   │       │   ├── BlobHandle.cs
│   │   │       │   ├── DatabaseHandle.cs
│   │   │       │   ├── FirebirdHandle.cs
│   │   │       │   ├── IFirebirdHandle.cs
│   │   │       │   ├── StatementHandle.cs
│   │   │       │   └── TransactionHandle.cs
│   │   │       ├── IFbClient.cs
│   │   │       ├── Marshalers/
│   │   │       │   ├── ArrayBoundMarshal.cs
│   │   │       │   ├── ArrayDescMarshal.cs
│   │   │       │   ├── ArrayDescMarshaler.cs
│   │   │       │   ├── XSQLDA.cs
│   │   │       │   ├── XSQLVAR.cs
│   │   │       │   └── XsqldaMarshaler.cs
│   │   │       └── StatusVectorHelper.cs
│   │   ├── Common/
│   │   │   ├── ArrayBase.cs
│   │   │   ├── ArrayBound.cs
│   │   │   ├── ArrayDesc.cs
│   │   │   ├── BatchBase.cs
│   │   │   ├── BatchParameterBuffer.cs
│   │   │   ├── BinaryEncoding.cs
│   │   │   ├── BlobBase.cs
│   │   │   ├── BlobParameterBuffer.cs
│   │   │   ├── BlobStream.cs
│   │   │   ├── Charset.cs
│   │   │   ├── ConnectionPoolLifetimeHelper.cs
│   │   │   ├── ConnectionString.cs
│   │   │   ├── DatabaseBase.cs
│   │   │   ├── DatabaseParameterBuffer1.cs
│   │   │   ├── DatabaseParameterBuffer2.cs
│   │   │   ├── DatabaseParameterBufferBase.cs
│   │   │   ├── DbDataType.cs
│   │   │   ├── DbField.cs
│   │   │   ├── DbStatementType.cs
│   │   │   ├── DbValue.cs
│   │   │   ├── DecimalCodec.cs
│   │   │   ├── DecimalShiftHelper.cs
│   │   │   ├── DecimalType.cs
│   │   │   ├── DenselyPackedDecimalCodec.cs
│   │   │   ├── Descriptor.cs
│   │   │   ├── EmptyDescriptorFiller.cs
│   │   │   ├── EventParameterBuffer.cs
│   │   │   ├── ExplicitCancellation.cs
│   │   │   ├── Extensions.cs
│   │   │   ├── IDescriptorFiller.cs
│   │   │   ├── InfoValuesConverter.cs
│   │   │   ├── Int128Helper.cs
│   │   │   ├── IscCodes.cs
│   │   │   ├── IscError.cs
│   │   │   ├── IscErrorMessages.cs
│   │   │   ├── IscException.cs
│   │   │   ├── IscHelper.cs
│   │   │   ├── NamedParametersParser.cs
│   │   │   ├── NativeHelpers.cs
│   │   │   ├── ParameterBuffer.cs
│   │   │   ├── RemoteEvent.cs
│   │   │   ├── ServiceManagerBase.cs
│   │   │   ├── ServiceParameterBuffer2.cs
│   │   │   ├── ServiceParameterBuffer3.cs
│   │   │   ├── ServiceParameterBufferBase.cs
│   │   │   ├── ShutdownHelper.cs
│   │   │   ├── SizeHelper.cs
│   │   │   ├── SqlStateMapping.cs
│   │   │   ├── StatementBase.cs
│   │   │   ├── StatementState.cs
│   │   │   ├── TimeZoneMapping.cs
│   │   │   ├── TransactionBase.cs
│   │   │   ├── TransactionParameterBuffer.cs
│   │   │   ├── TransactionState.cs
│   │   │   ├── TypeDecoder.cs
│   │   │   ├── TypeEncoder.cs
│   │   │   └── TypeHelper.cs
│   │   ├── FirebirdClient/
│   │   │   ├── FbBatchCommand.cs
│   │   │   ├── FbBatchNonQueryResult.cs
│   │   │   ├── FbBatchParameterCollection.cs
│   │   │   ├── FbCharset.cs
│   │   │   ├── FbCommand.cs
│   │   │   ├── FbCommandBuilder.cs
│   │   │   ├── FbConnection.cs
│   │   │   ├── FbConnectionInternal.cs
│   │   │   ├── FbConnectionPoolManager.cs
│   │   │   ├── FbConnectionStringBuilder.cs
│   │   │   ├── FbDataAdapter.cs
│   │   │   ├── FbDataReader.cs
│   │   │   ├── FbDatabaseInfo.cs
│   │   │   ├── FbDbType.cs
│   │   │   ├── FbEnlistmentNotification.cs
│   │   │   ├── FbError.cs
│   │   │   ├── FbErrorCollection.cs
│   │   │   ├── FbException.cs
│   │   │   ├── FbInfoMessageEventArgs.cs
│   │   │   ├── FbParameter.cs
│   │   │   ├── FbParameterCollection.cs
│   │   │   ├── FbRemoteEvent.cs
│   │   │   ├── FbRemoteEventCountsEventArgs.cs
│   │   │   ├── FbRemoteEventErrorEventArgs.cs
│   │   │   ├── FbRowUpdatedEventArgs.cs
│   │   │   ├── FbRowUpdatingEventArgs.cs
│   │   │   ├── FbServerType.cs
│   │   │   ├── FbTransaction.cs
│   │   │   ├── FbTransactionBehavior.cs
│   │   │   ├── FbTransactionInfo.cs
│   │   │   ├── FbTransactionOptions.cs
│   │   │   ├── FbWireCrypt.cs
│   │   │   ├── FirebirdClientFactory.cs
│   │   │   └── IFbPreparedCommand.cs
│   │   ├── FirebirdSql.Data.FirebirdClient.csproj
│   │   ├── Isql/
│   │   │   ├── CommandExecutedEventArgs.cs
│   │   │   ├── CommandExecutingEventArgs.cs
│   │   │   ├── FbBatchExecution.cs
│   │   │   ├── FbScript.cs
│   │   │   ├── FbStatement.cs
│   │   │   ├── FbStatementCollection.cs
│   │   │   ├── SqlStatementType.cs
│   │   │   ├── SqlStringParser.cs
│   │   │   └── UnknownStatementEventArgs.cs
│   │   ├── Logging/
│   │   │   ├── FbLogManager.cs
│   │   │   └── LogMessages.cs
│   │   ├── Properties/
│   │   │   ├── ComAssemblyInfo.cs
│   │   │   ├── FirebirdSql.Data.FirebirdClient.snk
│   │   │   └── InternalsVisibleToAssemblyInfo.cs
│   │   ├── Schema/
│   │   │   ├── FbCharacterSets.cs
│   │   │   ├── FbCheckConstraints.cs
│   │   │   ├── FbChecksByTable.cs
│   │   │   ├── FbCollations.cs
│   │   │   ├── FbColumnPrivileges.cs
│   │   │   ├── FbColumns.cs
│   │   │   ├── FbDomains.cs
│   │   │   ├── FbForeignKeyColumns.cs
│   │   │   ├── FbForeignKeys.cs
│   │   │   ├── FbFunctionArguments.cs
│   │   │   ├── FbFunctionPrivileges.cs
│   │   │   ├── FbFunctions.cs
│   │   │   ├── FbGenerators.cs
│   │   │   ├── FbIndexColumns.cs
│   │   │   ├── FbIndexes.cs
│   │   │   ├── FbMetaData.xml
│   │   │   ├── FbPrimaryKeys.cs
│   │   │   ├── FbProcedureParameters.cs
│   │   │   ├── FbProcedurePrivileges.cs
│   │   │   ├── FbProcedures.cs
│   │   │   ├── FbRoles.cs
│   │   │   ├── FbSchema.cs
│   │   │   ├── FbSchemaFactory.cs
│   │   │   ├── FbTableConstraints.cs
│   │   │   ├── FbTablePrivileges.cs
│   │   │   ├── FbTables.cs
│   │   │   ├── FbTriggers.cs
│   │   │   ├── FbUniqueKeys.cs
│   │   │   ├── FbViewColumns.cs
│   │   │   ├── FbViewPrivileges.cs
│   │   │   └── FbViews.cs
│   │   ├── Services/
│   │   │   ├── FbBackup.cs
│   │   │   ├── FbBackupFile.cs
│   │   │   ├── FbBackupFileCollection.cs
│   │   │   ├── FbBackupFlags.cs
│   │   │   ├── FbBackupRestoreStatistics.cs
│   │   │   ├── FbConfiguration.cs
│   │   │   ├── FbDatabaseTraceConfiguration.cs
│   │   │   ├── FbDatabaseTraceConfigurationCollection.cs
│   │   │   ├── FbDatabaseTraceEvents.cs
│   │   │   ├── FbDatabasesInfo.cs
│   │   │   ├── FbLog.cs
│   │   │   ├── FbNBackup.cs
│   │   │   ├── FbNBackupFlags.cs
│   │   │   ├── FbNFixup.cs
│   │   │   ├── FbNRestore.cs
│   │   │   ├── FbRestore.cs
│   │   │   ├── FbRestoreFlags.cs
│   │   │   ├── FbSecurity.cs
│   │   │   ├── FbServerConfig.cs
│   │   │   ├── FbServerProperties.cs
│   │   │   ├── FbService.cs
│   │   │   ├── FbServiceState.cs
│   │   │   ├── FbServiceTraceConfiguration.cs
│   │   │   ├── FbServiceTraceEvents.cs
│   │   │   ├── FbShutdownMode.cs
│   │   │   ├── FbShutdownOnlineMode.cs
│   │   │   ├── FbShutdownType.cs
│   │   │   ├── FbStatistical.cs
│   │   │   ├── FbStatisticalFlags.cs
│   │   │   ├── FbStreamingBackup.cs
│   │   │   ├── FbStreamingRestore.cs
│   │   │   ├── FbTrace.cs
│   │   │   ├── FbTraceConfiguration.cs
│   │   │   ├── FbTraceVersion.cs
│   │   │   ├── FbUserData.cs
│   │   │   ├── FbValidation.cs
│   │   │   ├── FbValidation2.cs
│   │   │   ├── FbValidationFlags.cs
│   │   │   └── ServiceOutputEventArgs.cs
│   │   └── Types/
│   │       ├── FbDecFloat.cs
│   │       ├── FbZonedDateTime.cs
│   │       └── FbZonedTime.cs
│   ├── FirebirdSql.Data.FirebirdClient.Tests/
│   │   ├── AuthBlockTests.cs
│   │   ├── BlobStreamTests.cs
│   │   ├── ConnectionPoolLifetimeHelperTests.cs
│   │   ├── ConnectionStringTests.cs
│   │   ├── FbArrayTests.cs
│   │   ├── FbBatchCommandTests.cs
│   │   ├── FbBlobTests.cs
│   │   ├── FbBooleanSupportTests.cs
│   │   ├── FbCommandBuilderTests.cs
│   │   ├── FbCommandTests.cs
│   │   ├── FbConnectionStringBuilderTests.cs
│   │   ├── FbConnectionTests.cs
│   │   ├── FbDataAdapterTests.cs
│   │   ├── FbDataReaderTests.cs
│   │   ├── FbDatabaseInfoTests.cs
│   │   ├── FbDecFloat16SupportTests.cs
│   │   ├── FbDecFloat34SupportTests.cs
│   │   ├── FbDecFloatTypeTests.cs
│   │   ├── FbExceptionTests.cs
│   │   ├── FbImplicitTransactionTests.cs
│   │   ├── FbInt128SupportTests.cs
│   │   ├── FbLongNumericsSupportTests.cs
│   │   ├── FbParameterCollectionTests.cs
│   │   ├── FbParameterTests.cs
│   │   ├── FbRemoteEventTests.cs
│   │   ├── FbSchemaTests.cs
│   │   ├── FbScriptTests.cs
│   │   ├── FbServicesTests.cs
│   │   ├── FbStoredProcedureCallsTests.cs
│   │   ├── FbTimeZonesSupportTests.cs
│   │   ├── FbTransactionInfoTests.cs
│   │   ├── FbTransactionTests.cs
│   │   ├── FbZonedDateTimeTypeTests.cs
│   │   ├── FbZonedTimeTypeTests.cs
│   │   ├── FirebirdSql.Data.FirebirdClient.Tests.csproj
│   │   ├── GuidTests.cs
│   │   ├── Srp256ClientTests.cs
│   │   ├── SrpClientTests.cs
│   │   ├── TrackerIssuesTests.cs
│   │   └── TransactionScopeTests.cs
│   ├── FirebirdSql.Data.TestsBase/
│   │   ├── FbServerTypeTestFixtureSource.cs
│   │   ├── FbTestsBase.cs
│   │   ├── FbTestsSetup.cs
│   │   ├── FirebirdSql.Data.TestsBase.projitems
│   │   ├── FirebirdSql.Data.TestsBase.shproj
│   │   ├── FirebirdSql.Data.TestsBase.snk
│   │   ├── NoServerCategoryAttribute.cs
│   │   └── Program.cs
│   ├── FirebirdSql.EntityFrameworkCore.Firebird/
│   │   ├── Design/
│   │   │   └── Internal/
│   │   │       └── FbDesignTimeServices.cs
│   │   ├── Diagnostics/
│   │   │   └── Internal/
│   │   │       └── FbLoggingDefinitions.cs
│   │   ├── Extensions/
│   │   │   ├── FbDatabaseFacadeExtensions.cs
│   │   │   ├── FbDbContextOptionsBuilderExtensions.cs
│   │   │   ├── FbModelBuilderExtensions.cs
│   │   │   ├── FbModelExtensions.cs
│   │   │   ├── FbPropertyBuilderExtensions.cs
│   │   │   ├── FbPropertyExtensions.cs
│   │   │   └── FbServiceCollectionExtensions.cs
│   │   ├── FirebirdSql.EntityFrameworkCore.Firebird.csproj
│   │   ├── Infrastructure/
│   │   │   ├── FbDbContextOptionsBuilder.cs
│   │   │   └── Internal/
│   │   │       ├── FbModelValidator.cs
│   │   │       ├── FbOptionsExtension.cs
│   │   │       └── IFbOptions.cs
│   │   ├── Internal/
│   │   │   └── FbOptions.cs
│   │   ├── Metadata/
│   │   │   ├── Conventions/
│   │   │   │   ├── FbConventionSetBuilder.cs
│   │   │   │   ├── FbStoreGenerationConvention.cs
│   │   │   │   ├── FbValueGenerationConvention.cs
│   │   │   │   └── FbValueGenerationStrategyConvention.cs
│   │   │   ├── FbIdentityType.cs
│   │   │   ├── FbValueGenerationStrategy.cs
│   │   │   └── Internal/
│   │   │       ├── FbAnnotationNames.cs
│   │   │       └── FbRelationalAnnotationProvider.cs
│   │   ├── Migrations/
│   │   │   ├── FbMigrationSqlGeneratorBehavior.cs
│   │   │   ├── FbMigrationsSqlGenerator.cs
│   │   │   ├── IFbMigrationSqlGeneratorBehavior.cs
│   │   │   └── Internal/
│   │   │       ├── FbHistoryRepository.cs
│   │   │       └── FbMigrationDatabaseLock.cs
│   │   ├── Properties/
│   │   │   ├── EntityFrameworkCoreAssemblyInfo.cs
│   │   │   └── FirebirdSql.EntityFrameworkCore.Firebird.snk
│   │   ├── Query/
│   │   │   ├── ExpressionTranslators/
│   │   │   │   └── Internal/
│   │   │   │       ├── FbByteArrayMethodTranslator.cs
│   │   │   │       ├── FbConvertTranslator.cs
│   │   │   │       ├── FbDateAddTranslator.cs
│   │   │   │       ├── FbDateOnlyMethodTranslator.cs
│   │   │   │       ├── FbDateOnlyPartComponentTranslator.cs
│   │   │   │       ├── FbDateTimeDateComponentTranslator.cs
│   │   │   │       ├── FbDateTimeNowTodayTranslator.cs
│   │   │   │       ├── FbDateTimePartComponentTranslator.cs
│   │   │   │       ├── FbMathTranslator.cs
│   │   │   │       ├── FbMemberTranslatorProvider.cs
│   │   │   │       ├── FbMethodCallTranslatorProvider.cs
│   │   │   │       ├── FbNewGuidTranslator.cs
│   │   │   │       ├── FbObjectToStringTranslator.cs
│   │   │   │       ├── FbStringContainsTranslator.cs
│   │   │   │       ├── FbStringEndsWithTranslator.cs
│   │   │   │       ├── FbStringFirstOrDefaultTranslator.cs
│   │   │   │       ├── FbStringIndexOfTranslator.cs
│   │   │   │       ├── FbStringIsNullOrWhiteSpaceTranslator.cs
│   │   │   │       ├── FbStringLastOrDefaultTranslator.cs
│   │   │   │       ├── FbStringLengthTranslator.cs
│   │   │   │       ├── FbStringReplaceTranslator.cs
│   │   │   │       ├── FbStringStartsWithTranslator.cs
│   │   │   │       ├── FbStringSubstringTranslator.cs
│   │   │   │       ├── FbStringToLowerTranslator.cs
│   │   │   │       ├── FbStringToUpperTranslator.cs
│   │   │   │       ├── FbStringTrimTranslator.cs
│   │   │   │       ├── FbTimeOnlyMethodTranslator.cs
│   │   │   │       ├── FbTimeOnlyPartComponentTranslator.cs
│   │   │   │       └── FbTimeSpanPartComponentTranslator.cs
│   │   │   ├── Expressions/
│   │   │   │   └── Internal/
│   │   │   │       └── FbSpacedFunctionExpression.cs
│   │   │   └── Internal/
│   │   │       ├── FbQueryRootProcessor.cs
│   │   │       ├── FbQuerySqlGenerator.cs
│   │   │       ├── FbQuerySqlGeneratorFactory.cs
│   │   │       ├── FbQueryTranslationPreprocessor.cs
│   │   │       ├── FbQueryTranslationPreprocessorFactory.cs
│   │   │       ├── FbSqlExpressionFactory.cs
│   │   │       ├── FbSqlTranslatingExpressionVisitor.cs
│   │   │       └── FbSqlTranslatingExpressionVisitorFactory.cs
│   │   ├── Scaffolding/
│   │   │   └── Internal/
│   │   │       ├── FbDatabaseModelFactory.cs
│   │   │       └── FbProviderCodeGenerator.cs
│   │   ├── Storage/
│   │   │   └── Internal/
│   │   │       ├── FbBoolTypeMapping.cs
│   │   │       ├── FbByteArrayTypeMapping.cs
│   │   │       ├── FbDatabaseCreator.cs
│   │   │       ├── FbDateOnlyTypeMapping.cs
│   │   │       ├── FbDateTimeTypeMapping.cs
│   │   │       ├── FbGuidTypeMapping.cs
│   │   │       ├── FbRelationalConnection.cs
│   │   │       ├── FbRelationalTransaction.cs
│   │   │       ├── FbSqlGenerationHelper.cs
│   │   │       ├── FbStringTypeMapping.cs
│   │   │       ├── FbTimeOnlyTypeMapping.cs
│   │   │       ├── FbTimeSpanTypeMapping.cs
│   │   │       ├── FbTransactionFactory.cs
│   │   │       ├── FbTypeMappingSource.cs
│   │   │       ├── IFbSqlGenerationHelper.cs
│   │   │       ├── IRelationalFbConnection.cs
│   │   │       └── IRelationalFbTransaction.cs
│   │   ├── Update/
│   │   │   └── Internal/
│   │   │       ├── FbModificationCommandBatchFactory.cs
│   │   │       ├── FbUpdateSqlGenerator.cs
│   │   │       └── IFbUpdateSqlGenerator.cs
│   │   ├── Utilities/
│   │   │   ├── EnumerableMethods.cs
│   │   │   ├── SharedTypeExtensions.cs
│   │   │   ├── StringBuilderExtensions.cs
│   │   │   └── TranslatorsHelper.cs
│   │   └── ValueGeneration/
│   │       └── Internal/
│   │           ├── FbSequenceHiLoValueGenerator.cs
│   │           ├── FbSequenceValueGeneratorFactory.cs
│   │           ├── FbSequenceValueGeneratorState.cs
│   │           ├── FbValueGeneratorCache.cs
│   │           ├── FbValueGeneratorSelector.cs
│   │           ├── IFbSequenceValueGeneratorFactory.cs
│   │           └── IFbValueGeneratorCache.cs
│   ├── FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests/
│   │   ├── ComplianceFbTest.cs
│   │   ├── FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.csproj
│   │   ├── Helpers/
│   │   │   ├── ModelHelpers.cs
│   │   │   ├── SkippingAttributes.cs
│   │   │   └── Xunit.cs
│   │   ├── MigrationsFbTest.cs
│   │   ├── Query/
│   │   │   ├── AdHocAdvancedMappingsQueryFbTest.cs
│   │   │   ├── AdHocComplexTypeQueryFbTest.cs
│   │   │   ├── AdHocManyToManyQueryFbTest.cs
│   │   │   ├── AdHocMiscellaneousQueryFbTest.cs
│   │   │   ├── AdHocNavigationsQueryFbTest.cs
│   │   │   ├── AdHocQueryFiltersQueryFbTest.cs
│   │   │   ├── AdHocQuerySplittingQueryFbTest.cs
│   │   │   ├── Associations/
│   │   │   │   ├── ComplexTableSplitting/
│   │   │   │   │   ├── ComplexTableSplittingBulkUpdateFbTest.cs
│   │   │   │   │   ├── ComplexTableSplittingFbFixture.cs
│   │   │   │   │   ├── ComplexTableSplittingMiscellaneousFbTest.cs
│   │   │   │   │   ├── ComplexTableSplittingProjectionFbTest.cs
│   │   │   │   │   └── ComplexTableSplittingStructuralEqualityFbTest.cs
│   │   │   │   ├── Navigations/
│   │   │   │   │   ├── NavigationsCollectionFbTest.cs
│   │   │   │   │   ├── NavigationsFbFixture.cs
│   │   │   │   │   ├── NavigationsIncludeFbTest.cs
│   │   │   │   │   ├── NavigationsMiscellaneousFbTest.cs
│   │   │   │   │   ├── NavigationsPrimitiveCollectionFbTest.cs
│   │   │   │   │   ├── NavigationsProjectionFbTest.cs
│   │   │   │   │   ├── NavigationsSetOperationsFbTest.cs
│   │   │   │   │   └── NavigationsStructuralEqualityFbTest.cs
│   │   │   │   ├── OwnedNavigations/
│   │   │   │   │   ├── OwnedNavigationsCollectionFbTest.cs
│   │   │   │   │   ├── OwnedNavigationsFbFixture.cs
│   │   │   │   │   ├── OwnedNavigationsMiscellaneousFbTest.cs
│   │   │   │   │   ├── OwnedNavigationsProjectionFbTest.cs
│   │   │   │   │   ├── OwnedNavigationsSetOperationsFbTest.cs
│   │   │   │   │   └── OwnedNavigationsStructuralEqualityFbTest.cs
│   │   │   │   └── OwnedTableSplitting/
│   │   │   │       ├── OwnedTableSplittingFbFixture.cs
│   │   │   │       ├── OwnedTableSplittingMiscellaneousFbTest.cs
│   │   │   │       ├── OwnedTableSplittingProjectionFbTest.cs
│   │   │   │       └── OwnedTableSplittingStructuralEqualityFbTest.cs
│   │   │   ├── ComplexNavigationsCollectionsQueryFbTest.cs
│   │   │   ├── ComplexNavigationsCollectionsSharedTypeQueryFbTest.cs
│   │   │   ├── ComplexNavigationsCollectionsSplitQueryFbTest.cs
│   │   │   ├── ComplexNavigationsCollectionsSplitSharedTypeQueryFbTest.cs
│   │   │   ├── ComplexNavigationsQueryFbFixture.cs
│   │   │   ├── ComplexNavigationsQueryFbTest.cs
│   │   │   ├── ComplexNavigationsSharedTypeQueryFbFixture.cs
│   │   │   ├── ComplexNavigationsSharedTypeQueryFbTest.cs
│   │   │   ├── ComplexTypeQueryFbTest.cs
│   │   │   ├── CompositeKeysQueryFbFixture.cs
│   │   │   ├── CompositeKeysQueryFbTest.cs
│   │   │   ├── CompositeKeysSplitQueryFbTest.cs
│   │   │   ├── Ef6GroupByFbTest.cs
│   │   │   ├── EntitySplittingQueryFbTest.cs
│   │   │   ├── FromSqlQueryFbTest.cs
│   │   │   ├── FromSqlSprocQueryFbTest.cs
│   │   │   ├── FunkyDataQueryFbTest.cs
│   │   │   ├── GearsOfWarFromSqlQueryFbTest.cs
│   │   │   ├── GearsOfWarQueryFbFixture.cs
│   │   │   ├── GearsOfWarQueryFbTest.cs
│   │   │   ├── IncludeOneToOneFbTest.cs
│   │   │   ├── IncompleteMappingInheritanceQueryFbFixture.cs
│   │   │   ├── IncompleteMappingInheritanceQueryFbTest.cs
│   │   │   ├── InheritanceRelationshipsQueryFbTest.cs
│   │   │   ├── ManyToManyNoTrackingQueryFbTest.cs
│   │   │   ├── ManyToManyQueryFbFixture.cs
│   │   │   ├── ManyToManyQueryFbTest.cs
│   │   │   ├── MappingQueryFbTest.cs
│   │   │   ├── NonSharedPrimitiveCollectionsQueryFbTest.cs
│   │   │   ├── NorthwindAggregateOperatorsQueryFbTest.cs
│   │   │   ├── NorthwindAsNoTrackingQueryFbTest.cs
│   │   │   ├── NorthwindAsTrackingQueryFbTest.cs
│   │   │   ├── NorthwindChangeTrackingQueryFbTest.cs
│   │   │   ├── NorthwindCompiledQueryFbTest.cs
│   │   │   ├── NorthwindDbFunctionsQueryFbTest.cs
│   │   │   ├── NorthwindEFPropertyIncludeQueryFbTest.cs
│   │   │   ├── NorthwindFunctionsQueryFbTest.cs
│   │   │   ├── NorthwindGroupByQueryFbTest.cs
│   │   │   ├── NorthwindIncludeNoTrackingQueryFbTest.cs
│   │   │   ├── NorthwindIncludeQueryFbTest.cs
│   │   │   ├── NorthwindJoinQueryFbTest.cs
│   │   │   ├── NorthwindKeylessEntitiesQueryFbTest.cs
│   │   │   ├── NorthwindMiscellaneousQueryFbTest.cs
│   │   │   ├── NorthwindNavigationsQueryFbTest.cs
│   │   │   ├── NorthwindQueryFbFixture.cs
│   │   │   ├── NorthwindQueryFiltersQueryFbTest.cs
│   │   │   ├── NorthwindQueryTaggingQueryFbTest.cs
│   │   │   ├── NorthwindSelectQueryFbTest.cs
│   │   │   ├── NorthwindSetOperationsQueryFbTest.cs
│   │   │   ├── NorthwindSplitIncludeNoTrackingQueryFbTest.cs
│   │   │   ├── NorthwindSplitIncludeQueryFbTest.cs
│   │   │   ├── NorthwindSqlQueryFbTest.cs
│   │   │   ├── NorthwindStringIncludeQueryFbTest.cs
│   │   │   ├── NorthwindWhereQueryFbTest.cs
│   │   │   ├── NullKeysFbTest.cs
│   │   │   ├── NullSemanticsQueryFbFixture.cs
│   │   │   ├── NullSemanticsQueryFbTest.cs
│   │   │   ├── OperatorsProceduralFbTest.cs
│   │   │   ├── OperatorsQueryFbTest.cs
│   │   │   ├── OptionalDependentQueryFbFixture.cs
│   │   │   ├── OptionalDependentQueryFbTest.cs
│   │   │   ├── OwnedEntityQueryFbTest.cs
│   │   │   ├── OwnedQueryFbTest.cs
│   │   │   ├── PrimitiveCollectionsQueryFbTest.cs
│   │   │   ├── QueryFilterFuncletizationFbTest.cs
│   │   │   ├── QueryNoClientEvalFbTest.cs
│   │   │   ├── SharedTypeQueryFbTest.cs
│   │   │   ├── SqlExecutorFbTest.cs
│   │   │   ├── SqlQueryFbTest.cs
│   │   │   ├── TPCFiltersInheritanceQueryFbFixture.cs
│   │   │   ├── TPCFiltersInheritanceQueryFbTest.cs
│   │   │   ├── TPCGearsOfWarQueryFbFixture.cs
│   │   │   ├── TPCGearsOfWarQueryFbTest.cs
│   │   │   ├── TPCInheritanceQueryFbFixture.cs
│   │   │   ├── TPCInheritanceQueryFbFixtureBase.cs
│   │   │   ├── TPCInheritanceQueryFbTest.cs
│   │   │   ├── TPCInheritanceQueryFbTestBase.cs
│   │   │   ├── TPCInheritanceQueryHiLoFbFixture.cs
│   │   │   ├── TPCInheritanceQueryHiLoFbTest.cs
│   │   │   ├── TPCManyToManyNoTrackingQueryFbTest.cs
│   │   │   ├── TPCManyToManyQueryFbFixture.cs
│   │   │   ├── TPCManyToManyQueryFbTest.cs
│   │   │   ├── TPCRelationshipsQueryFbTest.cs
│   │   │   ├── TPHFiltersInheritanceQueryFbFixture.cs
│   │   │   ├── TPHFiltersInheritanceQueryFbTest.cs
│   │   │   ├── TPHInheritanceQueryFbFixture.cs
│   │   │   ├── TPHInheritanceQueryFbTest.cs
│   │   │   ├── TPTFiltersInheritanceQueryFbFixture.cs
│   │   │   ├── TPTFiltersInheritanceQueryFbTest.cs
│   │   │   ├── TPTGearsOfWarQueryFbFixture.cs
│   │   │   ├── TPTGearsOfWarQueryFbTest.cs
│   │   │   ├── TPTInheritanceQueryFbFixture.cs
│   │   │   ├── TPTInheritanceQueryFbTest.cs
│   │   │   ├── TPTManyToManyNoTrackingQueryFbTest.cs
│   │   │   ├── TPTManyToManyQueryFbFixture.cs
│   │   │   ├── TPTManyToManyQueryFbTest.cs
│   │   │   ├── TPTRelationshipsQueryFbTest.cs
│   │   │   ├── ToSqlQueryFbTest.cs
│   │   │   ├── Translations/
│   │   │   │   ├── BasicTypesQueryFbFixture.cs
│   │   │   │   ├── ByteArrayTranslationsFbTest.cs
│   │   │   │   ├── EnumTranslationsFbTest.cs
│   │   │   │   ├── GuidTranslationsFbTest.cs
│   │   │   │   ├── MathTranslationsFbTest.cs
│   │   │   │   ├── MiscellaneousTranslationsFbTest.cs
│   │   │   │   ├── Operators/
│   │   │   │   │   ├── ArithmeticOperatorTranslationsFbTest.cs
│   │   │   │   │   ├── BitwiseOperatorTranslationsFbTest.cs
│   │   │   │   │   ├── ComparisonOperatorTranslationsFbTest.cs
│   │   │   │   │   ├── LogicalOperatorTranslationsFbTest.cs
│   │   │   │   │   └── MiscellaneousOperatorTranslationsFbTest.cs
│   │   │   │   ├── StringTranslationsFbTest.cs
│   │   │   │   └── Temporal/
│   │   │   │       ├── DateOnlyTranslationsFbTest.cs
│   │   │   │       ├── DateTimeOffsetTranslationsFbTest.cs
│   │   │   │       ├── DateTimeTranslationsFbTest.cs
│   │   │   │       ├── TimeOnlyTranslationsFbTest.cs
│   │   │   │       └── TimeSpanTranslationsFbTest.cs
│   │   │   ├── UdfDbFunctionFbTests.cs
│   │   │   └── WarningsFbTest.cs
│   │   ├── TestModels/
│   │   │   └── Northwind/
│   │   │       └── NorthwindFbContext.cs
│   │   ├── TestUtilities/
│   │   │   ├── FbPrecompiledQueryTestHelpers.cs
│   │   │   ├── FbTestHelpers.cs
│   │   │   ├── FbTestStore.cs
│   │   │   └── FbTestStoreFactory.cs
│   │   └── UpdatesFbTest.cs
│   ├── FirebirdSql.EntityFrameworkCore.Firebird.Tests/
│   │   ├── EndToEnd/
│   │   │   ├── DeleteTests.cs
│   │   │   ├── InsertTests.cs
│   │   │   └── UpdateTests.cs
│   │   ├── EntityFrameworkCoreTestsBase.cs
│   │   ├── FbTestDbContext.cs
│   │   ├── FirebirdSql.EntityFrameworkCore.Firebird.Tests.csproj
│   │   ├── Migrations/
│   │   │   └── MigrationsTests.cs
│   │   ├── Query/
│   │   │   └── ElementaryTests.cs
│   │   └── Scaffolding/
│   │       └── ScaffoldingTests.cs
│   ├── NETProvider.slnx
│   ├── Perf/
│   │   ├── CommandBenchmark.Execute.cs
│   │   ├── CommandBenchmark.Fetch.cs
│   │   ├── CommandBenchmark.cs
│   │   ├── Perf.csproj
│   │   └── Program.cs
│   ├── Scratchpad/
│   │   ├── Program.cs
│   │   └── Scratchpad.csproj
│   └── Versions.props
└── tests.ps1
Condensed preview — 647 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,999K chars).
[
  {
    "path": ".github/FUNDING.yml",
    "chars": 62,
    "preview": "github: cincuranet\ncustom: https://firebirdsql.org/en/donate/\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 1651,
    "preview": "name: CI\n\non: [push, pull_request]\n\nenv:\n  CONFIGURATION: Release\n  DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1\n\njobs:\n  ci:\n  "
  },
  {
    "path": ".gitignore",
    "chars": 48,
    "preview": "*.suo\n*.user\n*.lock.json\n.vs\nbin\nobj\nout/\n.idea\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 1058,
    "preview": "# Contributing\n\nThanks for considering contributing. Here are some items to consider before starting (in no particular o"
  },
  {
    "path": "README.md",
    "chars": 2327,
    "preview": "# Firebird .NET Data Provider\n\n## Documentation\n\n* [ADO.NET provider](docs/ado-net.md)\n* [Entity Framework 6 provider](d"
  },
  {
    "path": "build.ps1",
    "chars": 1946,
    "preview": "param(\n\t[Parameter(Mandatory=$True)]$Configuration)\n\n$ErrorActionPreference = 'Stop'\n\n$baseDir = Split-Path -Parent $PSC"
  },
  {
    "path": "docs/ado-net-schema.md",
    "chars": 892,
    "preview": "# ADO.NET - Schema\n\n### Steps\n\n* Install `FirebirdSql.Data.FirebirdClient` from NuGet.\n* Add `using FirebirdSql.Data.Fir"
  },
  {
    "path": "docs/ado-net.md",
    "chars": 969,
    "preview": "# ADO.NET\n\n### Steps\n\n* Install `FirebirdSql.Data.FirebirdClient` from NuGet.\n* Add `using FirebirdSql.Data.FirebirdClie"
  },
  {
    "path": "docs/batching.md",
    "chars": 1598,
    "preview": "# Batching\n\nBatching is supported for Firebird 4 (and above). The work is handled by `FbBatchCommand` class. It has simi"
  },
  {
    "path": "docs/decfloat.md",
    "chars": 418,
    "preview": "# DECFLOAT datatype\n\n`DECFLOAT(16)` and `DECFLOAT(34)` from Firebird 4 is handled by `FbDecFloat` type. `FbDecFloat` can"
  },
  {
    "path": "docs/entity-framework-6.md",
    "chars": 2526,
    "preview": "# Entity Framework 6\n\n### Steps\n\n* Install `EntityFramework.Firebird` from NuGet.\n* Create `DbProviderFactories` record "
  },
  {
    "path": "docs/entity-framework-core.md",
    "chars": 1466,
    "preview": "# Entity Framework Core 8.x\n\n* Install `FirebirdSql.EntityFrameworkCore.Firebird` from NuGet.\n* Create your `DbContext`."
  },
  {
    "path": "docs/events.md",
    "chars": 560,
    "preview": "# Events\n\n### Steps\n\n* Install `FirebirdSql.Data.FirebirdClient` from NuGet.\n* Add `using FirebirdSql.Data.FirebirdClien"
  },
  {
    "path": "docs/int128.md",
    "chars": 289,
    "preview": "# INT128 datatype\n\n`INT128` from Firebird 4 is handled by regular .NET `BigInteger` type. `BigInteger` can be used as pa"
  },
  {
    "path": "docs/services-backup.md",
    "chars": 505,
    "preview": "# Services - Backup\n\n### Steps\n\n* Install `FirebirdSql.Data.FirebirdClient` from NuGet.\n* Add `using FirebirdSql.Data.Se"
  },
  {
    "path": "docs/time-zones.md",
    "chars": 546,
    "preview": "# Time zones\n\nTime zones from Firebird 4 are handled by `FbZonedDateTime` and `FbZonedTime` types respectively. Given th"
  },
  {
    "path": "header.ps1",
    "chars": 1081,
    "preview": "$LicenseHeader = @\"\n/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Versi"
  },
  {
    "path": "include.ps1",
    "chars": 152,
    "preview": "function Check-ExitCode() {\n\t$exitCode = $LASTEXITCODE\n\tif ($exitCode -ne 0) {\n\t\techo \"Non-zero ($exitCode) exit code. E"
  },
  {
    "path": "license.txt",
    "chars": 23684,
    "preview": "Initial Developer's Public License Version 1.0\r\n\r\n1. Definitions\r\n\r\n1.0 \"Commercial Use\" means distribution or otherwise"
  },
  {
    "path": "src/.editorconfig",
    "chars": 295,
    "preview": "root = true\n\n[*]\nindent_style = tab\nindent_size = 4\ntrim_trailing_whitespace = true\n\n[*.cs]\ndotnet_sort_system_directive"
  },
  {
    "path": "src/Directory.Build.props",
    "chars": 1493,
    "preview": "<Project>\n\t<Import Project=\"Versions.props\" />\n\t<PropertyGroup>\n\t\t<LangVersion>latest</LangVersion>\n\t\t<DebugType>portabl"
  },
  {
    "path": "src/EntityFramework.Firebird/App.config.install.xdt",
    "chars": 560,
    "preview": "<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\n\t<entityFramework>\n\t\t<defaultConnection"
  },
  {
    "path": "src/EntityFramework.Firebird/DefaultFbMigrationSqlGeneratorBehavior.cs",
    "chars": 3740,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/EntityFramework.Firebird.csproj",
    "chars": 2845,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\t<PropertyGroup>\n\t\t<TargetFrameworks>net48;netstandard2.1</TargetFrameworks>\n\t\t<Assem"
  },
  {
    "path": "src/EntityFramework.Firebird/FbConnectionFactory.cs",
    "chars": 1479,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/FbMigrationSqlGenerator.cs",
    "chars": 24680,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/FbMigrationsTransactionsInterceptor.cs",
    "chars": 4467,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/FbProviderManifest.cs",
    "chars": 13999,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/FbProviderServices.cs",
    "chars": 13311,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/IFbMigrationSqlGeneratorBehavior.cs",
    "chars": 939,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/MetadataHelpers.cs",
    "chars": 12620,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/Resources/ProviderManifest.xml",
    "chars": 3555,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ProviderManifest Namespace=\"FirebirdClient\" xmlns=\"http://schemas.microsoft.com/"
  },
  {
    "path": "src/EntityFramework.Firebird/Resources/StoreSchemaDefinition.ssdl",
    "chars": 38936,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Schema Namespace=\"FirebirdClient_EF\" Provider=\"FirebirdSql.Data.FirebirdClient\" "
  },
  {
    "path": "src/EntityFramework.Firebird/Resources/StoreSchemaDefinitionVersion3.ssdl",
    "chars": 41307,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Schema Namespace=\"FirebirdClient_EF\" Provider=\"FirebirdSql.Data.FirebirdClient\" "
  },
  {
    "path": "src/EntityFramework.Firebird/Resources/StoreSchemaMapping.msl",
    "chars": 21101,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Mapping xmlns:cs=\"urn:schemas-microsoft-com:windows:storage:mapping:CS\" Space=\""
  },
  {
    "path": "src/EntityFramework.Firebird/Resources/StoreSchemaMappingVersion3.msl",
    "chars": 22906,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Mapping Space=\"C-S\" xmlns=\"urn:schemas-microsoft-com:windows:storage:mapping:CS"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/DmlSqlGenerator.cs",
    "chars": 7959,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/ExpressionTranslator.cs",
    "chars": 11663,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/FirstClause.cs",
    "chars": 2017,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/ISqlFragment.cs",
    "chars": 790,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/JoinSymbol.cs",
    "chars": 2157,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/SkipClause.cs",
    "chars": 1970,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/SqlBuilder.cs",
    "chars": 2676,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/SqlGenerator.cs",
    "chars": 121337,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/SqlSelectStatement.cs",
    "chars": 7083,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/SqlWriter.cs",
    "chars": 2175,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/Symbol.cs",
    "chars": 2847,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/SymbolPair.cs",
    "chars": 1369,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SqlGen/SymbolTable.cs",
    "chars": 1419,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/SsdlToFb.cs",
    "chars": 5303,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/TypeHelpers.cs",
    "chars": 1580,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird/Web.config.install.xdt",
    "chars": 560,
    "preview": "<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\n\t<entityFramework>\n\t\t<defaultConnection"
  },
  {
    "path": "src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj",
    "chars": 1691,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\t<PropertyGroup>\n\t\t<TargetFramework>net10.0</TargetFramework>\n\t\t<GenerateAssemblyInfo"
  },
  {
    "path": "src/EntityFramework.Firebird.Tests/EntityFrameworkTestsBase.cs",
    "chars": 1640,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird.Tests/FbTestDbContext.cs",
    "chars": 1036,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird.Tests/InfrastructureTests.cs",
    "chars": 1502,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird.Tests/QueryTests.cs",
    "chars": 5980,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/EntityFramework.Firebird.Tests/app.config",
    "chars": 960,
    "preview": "<?xml version=\"1.0\"?>\n<configuration>\n\t<configSections>\n\t\t<section name=\"entityFramework\" type=\"System.Data.Entity.Inte"
  },
  {
    "path": "src/FirebirdSql.Data.External/FirebirdSql.Data.External.projitems",
    "chars": 1228,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Propert"
  },
  {
    "path": "src/FirebirdSql.Data.External/FirebirdSql.Data.External.shproj",
    "chars": 1050,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
  },
  {
    "path": "src/FirebirdSql.Data.External/RC4/ICipherParameters.cs",
    "chars": 167,
    "preview": "using System;\n\nnamespace Org.BouncyCastle.Crypto\n{\n    /**\n     * all parameter classes implement this.\n     */\n    inte"
  },
  {
    "path": "src/FirebirdSql.Data.External/RC4/KeyParameter.cs",
    "chars": 909,
    "preview": "using System;\n\nusing Org.BouncyCastle.Crypto;\n\nnamespace Org.BouncyCastle.Crypto.Parameters\n{\n    internal class KeyPara"
  },
  {
    "path": "src/FirebirdSql.Data.External/RC4/RC4Engine.cs",
    "chars": 3911,
    "preview": "using System;\n\nusing Org.BouncyCastle.Crypto.Parameters;\n//using Org.BouncyCastle.Utilities;\n\nnamespace Org.BouncyCastle"
  },
  {
    "path": "src/FirebirdSql.Data.External/zlib/Deflate.cs",
    "chars": 75768,
    "preview": "// Deflate.cs\n// ------------------------------------------------------------------\n//\n// Copyright (c) 2009 Dino Chiesa"
  },
  {
    "path": "src/FirebirdSql.Data.External/zlib/InfTree.cs",
    "chars": 29352,
    "preview": "// Inftree.cs\n// ------------------------------------------------------------------\n//\n// Copyright (c) 2009 Dino Chiesa"
  },
  {
    "path": "src/FirebirdSql.Data.External/zlib/Inflate.cs",
    "chars": 72739,
    "preview": "// Inflate.cs\n// ------------------------------------------------------------------\n//\n// Copyright (c) 2009 Dino Chiesa"
  },
  {
    "path": "src/FirebirdSql.Data.External/zlib/Tree.cs",
    "chars": 19527,
    "preview": "// Tree.cs\n// ------------------------------------------------------------------\n//\n// Copyright (c) 2009 Dino Chiesa an"
  },
  {
    "path": "src/FirebirdSql.Data.External/zlib/Zlib.cs",
    "chars": 21738,
    "preview": "// Zlib.cs\n// ------------------------------------------------------------------\n//\n// Copyright (c) 2009-2011 Dino Chie"
  },
  {
    "path": "src/FirebirdSql.Data.External/zlib/ZlibCodec.cs",
    "chars": 30276,
    "preview": "// ZlibCodec.cs\n// ------------------------------------------------------------------\n//\n// Copyright (c) 2009 Dino Chie"
  },
  {
    "path": "src/FirebirdSql.Data.External/zlib/ZlibConstants.cs",
    "chars": 4851,
    "preview": "// ZlibConstants.cs\n// ------------------------------------------------------------------\n//\n// Copyright (c) 2009 Dino "
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/ClientFactory.cs",
    "chars": 9341,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/AuthBlock.cs",
    "chars": 12130,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/DataProviderStreamWrapper.cs",
    "chars": 2101,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/FetchResponse.cs",
    "chars": 950,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/FirebirdNetworkHandlingWrapper.cs",
    "chars": 7685,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/GdsConnection.cs",
    "chars": 19861,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/GenericResponse.cs",
    "chars": 1137,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/IDataProvider.cs",
    "chars": 1183,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/IResponse.cs",
    "chars": 1370,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/ITracksIOFailure.cs",
    "chars": 753,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/IXdrReader.cs",
    "chars": 3902,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/IXdrWriter.cs",
    "chars": 3581,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/ProtocolsSupported.cs",
    "chars": 1664,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/SqlResponse.cs",
    "chars": 887,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Srp/Srp256Client.cs",
    "chars": 1022,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Srp/SrpClient.cs",
    "chars": 1014,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Srp/SrpClientBase.cs",
    "chars": 6487,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Sspi/SspiHelper.cs",
    "chars": 11768,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsArray.cs",
    "chars": 21582,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsBlob.cs",
    "chars": 14389,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsDatabase.cs",
    "chars": 26636,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsEventManager.cs",
    "chars": 3057,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsServiceManager.cs",
    "chars": 8745,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsStatement.cs",
    "chars": 55448,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsTransaction.cs",
    "chars": 12675,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version11/AuthResponse.cs",
    "chars": 904,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version11/GdsDatabase.cs",
    "chars": 8622,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version11/GdsServiceManager.cs",
    "chars": 1031,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version11/GdsStatement.cs",
    "chars": 9068,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version12/GdsDatabase.cs",
    "chars": 2287,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version12/GdsServiceManager.cs",
    "chars": 1031,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version12/GdsStatement.cs",
    "chars": 4994,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version13/ContAuthResponse.cs",
    "chars": 1162,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version13/CryptKeyCallbackResponse.cs",
    "chars": 910,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version13/GdsDatabase.cs",
    "chars": 12328,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version13/GdsServiceManager.cs",
    "chars": 4979,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version13/GdsStatement.cs",
    "chars": 4922,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version13/WireCryptOption.cs",
    "chars": 769,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version15/CryptKeyCallbackResponse.cs",
    "chars": 961,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version15/GdsDatabase.cs",
    "chars": 2292,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version15/GdsServiceManager.cs",
    "chars": 1098,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version15/GdsStatement.cs",
    "chars": 1089,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version16/BatchCompletionStateResponse.cs",
    "chars": 1426,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version16/GdsBatch.cs",
    "chars": 8655,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version16/GdsDatabase.cs",
    "chars": 2312,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version16/GdsServiceManager.cs",
    "chars": 1098,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version16/GdsStatement.cs",
    "chars": 1802,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Managed/XdrReaderWriter.cs",
    "chars": 25908,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/FbClientFactory.cs",
    "chars": 11156,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/FesArray.cs",
    "chars": 15585,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/FesBlob.cs",
    "chars": 10292,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/FesConnection.cs",
    "chars": 1135,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/FesDatabase.cs",
    "chars": 11623,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/FesServiceManager.cs",
    "chars": 5310,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/FesStatement.cs",
    "chars": 19862,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/FesTransaction.cs",
    "chars": 9808,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Handles/BlobHandle.cs",
    "chars": 1363,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Handles/DatabaseHandle.cs",
    "chars": 1372,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Handles/FirebirdHandle.cs",
    "chars": 1380,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Handles/IFirebirdHandle.cs",
    "chars": 864,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Handles/StatementHandle.cs",
    "chars": 1398,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Handles/TransactionHandle.cs",
    "chars": 1380,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/IFbClient.cs",
    "chars": 8161,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Marshalers/ArrayBoundMarshal.cs",
    "chars": 893,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Marshalers/ArrayDescMarshal.cs",
    "chars": 1249,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Marshalers/ArrayDescMarshaler.cs",
    "chars": 2421,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Marshalers/XSQLDA.cs",
    "chars": 991,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Marshalers/XSQLVAR.cs",
    "chars": 1430,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/Marshalers/XsqldaMarshaler.cs",
    "chars": 8755,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Client/Native/StatusVectorHelper.cs",
    "chars": 3276,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ArrayBase.cs",
    "chars": 8266,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ArrayBound.cs",
    "chars": 898,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ArrayDesc.cs",
    "chars": 1207,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/BatchBase.cs",
    "chars": 1679,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/BatchParameterBuffer.cs",
    "chars": 1315,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/BinaryEncoding.cs",
    "chars": 3247,
    "preview": "/*\n *  BinaryEncoding handler for .Net.  This class implements\n *\ta symmetric encoding that will convert string to byte"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/BlobBase.cs",
    "chars": 5882,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/BlobParameterBuffer.cs",
    "chars": 904,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/BlobStream.cs",
    "chars": 4889,
    "preview": "using System;\nusing System.IO;\nusing System.Threading;\nusing System.Threading.Tasks;\n\nnamespace FirebirdSql.Data.Common"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/Charset.cs",
    "chars": 5389,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ConnectionPoolLifetimeHelper.cs",
    "chars": 952,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ConnectionString.cs",
    "chars": 23661,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DatabaseBase.cs",
    "chars": 5139,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DatabaseParameterBuffer1.cs",
    "chars": 1341,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DatabaseParameterBuffer2.cs",
    "chars": 1325,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DatabaseParameterBufferBase.cs",
    "chars": 1235,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DbDataType.cs",
    "chars": 985,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DbField.cs",
    "chars": 11346,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DbStatementType.cs",
    "chars": 1481,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DbValue.cs",
    "chars": 22768,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DecimalCodec.cs",
    "chars": 8057,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DecimalShiftHelper.cs",
    "chars": 976,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DecimalType.cs",
    "chars": 754,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/DenselyPackedDecimalCodec.cs",
    "chars": 21969,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/Descriptor.cs",
    "chars": 6870,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/EmptyDescriptorFiller.cs",
    "chars": 1141,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/EventParameterBuffer.cs",
    "chars": 1146,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ExplicitCancellation.cs",
    "chars": 1872,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/Extensions.cs",
    "chars": 2130,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/IDescriptorFiller.cs",
    "chars": 930,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/InfoValuesConverter.cs",
    "chars": 869,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/Int128Helper.cs",
    "chars": 1602,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/IscCodes.cs",
    "chars": 45923,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/IscError.cs",
    "chars": 1895,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/IscErrorMessages.cs",
    "chars": 216703,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/IscException.cs",
    "chars": 6528,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/IscHelper.cs",
    "chars": 6965,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/NamedParametersParser.cs",
    "chars": 2098,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/NativeHelpers.cs",
    "chars": 1254,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ParameterBuffer.cs",
    "chars": 2047,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/RemoteEvent.cs",
    "chars": 4387,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ServiceManagerBase.cs",
    "chars": 2206,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ServiceParameterBuffer2.cs",
    "chars": 1429,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ServiceParameterBuffer3.cs",
    "chars": 1369,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ServiceParameterBufferBase.cs",
    "chars": 1346,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/ShutdownHelper.cs",
    "chars": 1520,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/SizeHelper.cs",
    "chars": 1159,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/SqlStateMapping.cs",
    "chars": 70810,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/StatementBase.cs",
    "chars": 13039,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/StatementState.cs",
    "chars": 802,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/TimeZoneMapping.cs",
    "chars": 38127,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/TransactionBase.cs",
    "chars": 2831,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/TransactionParameterBuffer.cs",
    "chars": 1440,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/TransactionState.cs",
    "chars": 760,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/TypeDecoder.cs",
    "chars": 3726,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/TypeEncoder.cs",
    "chars": 3862,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/Common/TypeHelper.cs",
    "chars": 16572,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchCommand.cs",
    "chars": 32854,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchNonQueryResult.cs",
    "chars": 2155,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  },
  {
    "path": "src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbBatchParameterCollection.cs",
    "chars": 1943,
    "preview": "/*\n *    The contents of this file are subject to the Initial\n *    Developer's Public License Version 1.0 (the \"Licens"
  }
]

// ... and 447 more files (download for full content)

About this extraction

This page contains the full source code of the FirebirdSQL/NETProvider GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 647 files (3.5 MB), approximately 946.2k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!