classSqliteTypeMapper
final class SqliteTypeMapper
implements TypeMapperInterface
Type mapper for SQLite based on type affinity rules.
SQLite uses "type affinity" where the declared type is mapped to one of:
- INTEGER: INT, INTEGER, TINYINT, SMALLINT, MEDIUMINT, BIGINT, INT2, INT8
- TEXT: CHAR, VARCHAR, TEXT, CLOB
- REAL: REAL, DOUBLE, FLOAT
- BLOB: BLOB or no type
- NUMERIC: DECIMAL, BOOLEAN, DATE, DATETIME, NUMERIC
Methods§
public function generate(Generator $faker, ColumnDefinition $column): mixedGenerates fixture data according to the supplied schema or plan.
Parameters
$faker | Generator | |
$column | ColumnDefinition |
Returns
mixedTest cases 110
SqliteTypeMapperTest::testBooleanProducesBothZeroAndOnecallsSqliteTypeMapperTest::testGenerateAutoIncrementReturnsNullcallsSqliteTypeMapperTest::testGenerateBigIntcallsSqliteTypeMapperTest::testGenerateBlobAffinitycallsSqliteTypeMapperTest::testGenerateBlobExactLengthOutputcallsSqliteTypeMapperTest::testGenerateBlobWithLengthcallsSqliteTypeMapperTest::testGenerateBlobWithoutLengthNonEmptycallsSqliteTypeMapperTest::testGenerateBooleanReturnsOneOrZerocallsSqliteTypeMapperTest::testGenerateCharcallsSqliteTypeMapperTest::testGenerateCharExactLengthcallsSqliteTypeMapperTest::testGenerateCharSubstrStartsAtZerocallsSqliteTypeMapperTest::testGenerateClobcallsSqliteTypeMapperTest::testGenerateDecimalcallsSqliteTypeMapperTest::testGenerateDecimalBoundaryValuescallsSqliteTypeMapperTest::testGenerateDecimalDefaultPrecisioncallsSqliteTypeMapperTest::testGenerateDoublecallsSqliteTypeMapperTest::testGenerateDoublePrecisionOnlySeed12345callsSqliteTypeMapperTest::testGenerateEmptyTypeBlobAffinitycallsSqliteTypeMapperTest::testGenerateFloatcallsSqliteTypeMapperTest::testGenerateFloatRangecallsSqliteTypeMapperTest::testGenerateGeneratedColumnReturnsNullcallsSqliteTypeMapperTest::testGenerateIntcallsSqliteTypeMapperTest::testGenerateInt2AliascallsSqliteTypeMapperTest::testGenerateInt8AliascallsSqliteTypeMapperTest::testGenerateIntegerAffinitycallsSqliteTypeMapperTest::testGenerateIntegerBoundaryValuescallsSqliteTypeMapperTest::testGenerateLongTextcallsSqliteTypeMapperTest::testGenerateLowercaseTypeWorkscallsSqliteTypeMapperTest::testGenerateMediumIntcallsSqliteTypeMapperTest::testGenerateMediumTextcallsSqliteTypeMapperTest::testGenerateNonNullableNeverReturnsNullcallsSqliteTypeMapperTest::testGenerateNullablecallsSqliteTypeMapperTest::testGenerateNumericcallsSqliteTypeMapperTest::testGenerateNumericAffinityBooleancallsSqliteTypeMapperTest::testGenerateNumericAffinityDatecallsSqliteTypeMapperTest::testGenerateNumericAffinityDatetimecallsSqliteTypeMapperTest::testGenerateNumericAffinityTimecallsSqliteTypeMapperTest::testGenerateNumericDefaultAffinitycallsSqliteTypeMapperTest::testGenerateRealAffinitycallsSqliteTypeMapperTest::testGenerateRealWithPrecisionScalecallsSqliteTypeMapperTest::testGenerateSmallIntcallsSqliteTypeMapperTest::testGenerateSmallIntBoundarycallsSqliteTypeMapperTest::testGenerateTextAffinitycallsSqliteTypeMapperTest::testGenerateTextWithLengthcallsSqliteTypeMapperTest::testGenerateTextWithLengthLimitcallsSqliteTypeMapperTest::testGenerateTextWithLengthSeed12345callsSqliteTypeMapperTest::testGenerateTextWithLengthStartsFromBeginningcallsSqliteTypeMapperTest::testGenerateTextWithLengthSubstrStartsAtZerocallsSqliteTypeMapperTest::testGenerateTimestampcallsSqliteTypeMapperTest::testGenerateTinyIntcallsSqliteTypeMapperTest::testGenerateTinyTextcallsSqliteTypeMapperTest::testGenerateTinyTextLengthcallsSqliteTypeMapperTest::testGenerateTinyTextStartsFromBeginningcallsSqliteTypeMapperTest::testGenerateVarcharcallsSqliteTypeMapperTest::testLowercaseBigintGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseCharGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseClobGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseDateGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseDatetimeGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseDecimalGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseDoubleGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseFloatGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseInt2GeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseInt8GeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseLongtextGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseMediumintGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseMediumtextGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseSmallintGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseTimeGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseTimestampGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseTinyintGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseTinytextGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseTypeUsesStrtouppercallsSqliteTypeMapperTest::testNullableColumnDefaultRatioIsLowcallsSqliteTypeMapperTest::testNullableColumnReturnsDefaultcallsSqliteTypeMapperTest::testNullableColumnReturnsDefaultWithSpecificSeedcallsSqliteTypeMapperTest::testNullableColumnReturnsGeneratedWithSpecificSeedcallsSqliteTypeMapperTest::testNullableColumnSeed285ReturnsGeneratedcallsSqliteTypeMapperTest::testNullableColumnSeed28ReturnsDefaultcallsSqliteTypeMapperTest::testSnapshotAnytypecallsSqliteTypeMapperTest::testSnapshotAnytypeExactcallsSqliteTypeMapperTest::testSnapshotBigIntcallsSqliteTypeMapperTest::testSnapshotBlobExactLengthcallsSqliteTypeMapperTest::testSnapshotBlobWithLengthcallsSqliteTypeMapperTest::testSnapshotBlobWithoutLengthcallsSqliteTypeMapperTest::testSnapshotBooleancallsSqliteTypeMapperTest::testSnapshotBooleanValuescallsSqliteTypeMapperTest::testSnapshotCharcallsSqliteTypeMapperTest::testSnapshotDatecallsSqliteTypeMapperTest::testSnapshotDatetimecallsSqliteTypeMapperTest::testSnapshotDecimalcallsSqliteTypeMapperTest::testSnapshotDecimalDefaultPrecisioncallsSqliteTypeMapperTest::testSnapshotDecimalExactcallsSqliteTypeMapperTest::testSnapshotDoublecallsSqliteTypeMapperTest::testSnapshotEmptyTypecallsSqliteTypeMapperTest::testSnapshotFloatExactcallsSqliteTypeMapperTest::testSnapshotFloatValuecallsSqliteTypeMapperTest::testSnapshotIntcallsSqliteTypeMapperTest::testSnapshotInt2callsSqliteTypeMapperTest::testSnapshotInt8callsSqliteTypeMapperTest::testSnapshotIntegercallsSqliteTypeMapperTest::testSnapshotMediumIntcallsSqliteTypeMapperTest::testSnapshotNumericcallsSqliteTypeMapperTest::testSnapshotRealcallsSqliteTypeMapperTest::testSnapshotRealWithPrecisioncallsSqliteTypeMapperTest::testSnapshotSmallIntcallsSqliteTypeMapperTest::testSnapshotTimecallsSqliteTypeMapperTest::testSnapshotTimestampcallsSqliteTypeMapperTest::testSnapshotTinyIntcallsTypeMapperInterfaceTest::testGenerateReturnsAValueForTheColumncalls
Calls 3
- method-call ColumnGenerator::generateValue() line 32
- new ColumnGenerator line 32
- method-call
Generator::boolean()line 35
Test cases 117§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 109
SqliteTypeMapperTest::testBooleanProducesBothZeroAndOnecallsSqliteTypeMapperTest::testGenerateAutoIncrementReturnsNullcallsSqliteTypeMapperTest::testGenerateBigIntcallsSqliteTypeMapperTest::testGenerateBlobAffinitycallsSqliteTypeMapperTest::testGenerateBlobExactLengthOutputcallsSqliteTypeMapperTest::testGenerateBlobWithLengthcallsSqliteTypeMapperTest::testGenerateBlobWithoutLengthNonEmptycallsSqliteTypeMapperTest::testGenerateBooleanReturnsOneOrZerocallsSqliteTypeMapperTest::testGenerateCharcallsSqliteTypeMapperTest::testGenerateCharExactLengthcallsSqliteTypeMapperTest::testGenerateCharSubstrStartsAtZerocallsSqliteTypeMapperTest::testGenerateClobcallsSqliteTypeMapperTest::testGenerateDecimalcallsSqliteTypeMapperTest::testGenerateDecimalBoundaryValuescallsSqliteTypeMapperTest::testGenerateDecimalDefaultPrecisioncallsSqliteTypeMapperTest::testGenerateDoublecallsSqliteTypeMapperTest::testGenerateDoublePrecisionOnlySeed12345callsSqliteTypeMapperTest::testGenerateEmptyTypeBlobAffinitycallsSqliteTypeMapperTest::testGenerateFloatcallsSqliteTypeMapperTest::testGenerateFloatRangecallsSqliteTypeMapperTest::testGenerateGeneratedColumnReturnsNullcallsSqliteTypeMapperTest::testGenerateIntcallsSqliteTypeMapperTest::testGenerateInt2AliascallsSqliteTypeMapperTest::testGenerateInt8AliascallsSqliteTypeMapperTest::testGenerateIntegerAffinitycallsSqliteTypeMapperTest::testGenerateIntegerBoundaryValuescallsSqliteTypeMapperTest::testGenerateLongTextcallsSqliteTypeMapperTest::testGenerateLowercaseTypeWorkscallsSqliteTypeMapperTest::testGenerateMediumIntcallsSqliteTypeMapperTest::testGenerateMediumTextcallsSqliteTypeMapperTest::testGenerateNonNullableNeverReturnsNullcallsSqliteTypeMapperTest::testGenerateNullablecallsSqliteTypeMapperTest::testGenerateNumericcallsSqliteTypeMapperTest::testGenerateNumericAffinityBooleancallsSqliteTypeMapperTest::testGenerateNumericAffinityDatecallsSqliteTypeMapperTest::testGenerateNumericAffinityDatetimecallsSqliteTypeMapperTest::testGenerateNumericAffinityTimecallsSqliteTypeMapperTest::testGenerateNumericDefaultAffinitycallsSqliteTypeMapperTest::testGenerateRealAffinitycallsSqliteTypeMapperTest::testGenerateRealWithPrecisionScalecallsSqliteTypeMapperTest::testGenerateSmallIntcallsSqliteTypeMapperTest::testGenerateSmallIntBoundarycallsSqliteTypeMapperTest::testGenerateTextAffinitycallsSqliteTypeMapperTest::testGenerateTextWithLengthcallsSqliteTypeMapperTest::testGenerateTextWithLengthLimitcallsSqliteTypeMapperTest::testGenerateTextWithLengthSeed12345callsSqliteTypeMapperTest::testGenerateTextWithLengthStartsFromBeginningcallsSqliteTypeMapperTest::testGenerateTextWithLengthSubstrStartsAtZerocallsSqliteTypeMapperTest::testGenerateTimestampcallsSqliteTypeMapperTest::testGenerateTinyIntcallsSqliteTypeMapperTest::testGenerateTinyTextcallsSqliteTypeMapperTest::testGenerateTinyTextLengthcallsSqliteTypeMapperTest::testGenerateTinyTextStartsFromBeginningcallsSqliteTypeMapperTest::testGenerateVarcharcallsSqliteTypeMapperTest::testLowercaseBigintGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseCharGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseClobGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseDateGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseDatetimeGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseDecimalGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseDoubleGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseFloatGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseInt2GeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseInt8GeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseLongtextGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseMediumintGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseMediumtextGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseSmallintGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseTimeGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseTimestampGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseTinyintGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseTinytextGeneratesSameAsUppercasecallsSqliteTypeMapperTest::testLowercaseTypeUsesStrtouppercallsSqliteTypeMapperTest::testNullableColumnDefaultRatioIsLowcallsSqliteTypeMapperTest::testNullableColumnReturnsDefaultcallsSqliteTypeMapperTest::testNullableColumnReturnsDefaultWithSpecificSeedcallsSqliteTypeMapperTest::testNullableColumnReturnsGeneratedWithSpecificSeedcallsSqliteTypeMapperTest::testNullableColumnSeed285ReturnsGeneratedcallsSqliteTypeMapperTest::testNullableColumnSeed28ReturnsDefaultcallsSqliteTypeMapperTest::testSnapshotAnytypecallsSqliteTypeMapperTest::testSnapshotAnytypeExactcallsSqliteTypeMapperTest::testSnapshotBigIntcallsSqliteTypeMapperTest::testSnapshotBlobExactLengthcallsSqliteTypeMapperTest::testSnapshotBlobWithLengthcallsSqliteTypeMapperTest::testSnapshotBlobWithoutLengthcallsSqliteTypeMapperTest::testSnapshotBooleancallsSqliteTypeMapperTest::testSnapshotBooleanValuescallsSqliteTypeMapperTest::testSnapshotCharcallsSqliteTypeMapperTest::testSnapshotDatecallsSqliteTypeMapperTest::testSnapshotDatetimecallsSqliteTypeMapperTest::testSnapshotDecimalcallsSqliteTypeMapperTest::testSnapshotDecimalDefaultPrecisioncallsSqliteTypeMapperTest::testSnapshotDecimalExactcallsSqliteTypeMapperTest::testSnapshotDoublecallsSqliteTypeMapperTest::testSnapshotEmptyTypecallsSqliteTypeMapperTest::testSnapshotFloatExactcallsSqliteTypeMapperTest::testSnapshotFloatValuecallsSqliteTypeMapperTest::testSnapshotIntcallsSqliteTypeMapperTest::testSnapshotInt2callsSqliteTypeMapperTest::testSnapshotInt8callsSqliteTypeMapperTest::testSnapshotIntegercallsSqliteTypeMapperTest::testSnapshotMediumIntcallsSqliteTypeMapperTest::testSnapshotNumericcallsSqliteTypeMapperTest::testSnapshotRealcallsSqliteTypeMapperTest::testSnapshotRealWithPrecisioncallsSqliteTypeMapperTest::testSnapshotSmallIntcallsSqliteTypeMapperTest::testSnapshotTimecallsSqliteTypeMapperTest::testSnapshotTimestampcallsSqliteTypeMapperTest::testSnapshotTinyIntcalls
Other tests reaching this symbol 8
PostgreSqlEndToEndTestcallsSqliteIntegrationTestcallsDatabaseFixtureProviderTest::testFixtureWithCustomTypeMappercallsFileFixtureProviderTestcallsFixtureProviderTestcallsPlatformFactoryTest::testCreateTypeMapperForSqlitecallsSqlSchemaProviderTestcallsTypeMapperInterfaceTest::testGenerateReturnsAValueForTheColumncalls