@@ -600,59 +600,64 @@ public void InsertLargeBlobSync(string column, int size)
600600
601601#if ! NETCOREAPP1_1_2
602602 [ Theory ]
603- [ InlineData ( "Bit1" , "datatypes_bits" , 1 , typeof ( ulong ) , false , false , false , true , 0 , 0 ) ]
604- [ InlineData ( "Bit32" , "datatypes_bits" , 32 , typeof ( ulong ) , false , false , false , true , 0 , 0 ) ]
605- [ InlineData ( "Bit64" , "datatypes_bits" , 64 , typeof ( ulong ) , false , false , false , true , 0 , 0 ) ]
606- [ InlineData ( "Binary" , "datatypes_blobs" , 100 , typeof ( byte [ ] ) , false , false , false , true , 0 , 0 ) ]
607- [ InlineData ( "VarBinary" , "datatypes_blobs" , 100 , typeof ( byte [ ] ) , false , false , false , true , 0 , 0 ) ]
608- [ InlineData ( "TinyBlob" , "datatypes_blobs" , 255 , typeof ( byte [ ] ) , false , false , false , true , 0 , 0 ) ]
609- [ InlineData ( "Blob" , "datatypes_blobs" , 65535 , typeof ( byte [ ] ) , false , true , false , true , 0 , 0 ) ]
610- [ InlineData ( "MediumBlob" , "datatypes_blobs" , 16777215 , typeof ( byte [ ] ) , false , true , false , true , 0 , 0 ) ]
611- [ InlineData ( "LongBlob" , "datatypes_blobs" , int . MaxValue , typeof ( byte [ ] ) , false , true , false , true , 0 , 0 ) ]
612- [ InlineData ( "guidbin" , "datatypes_blobs" , 16 , typeof ( byte [ ] ) , false , false , false , true , 0 , 0 ) ]
613- [ InlineData ( "rowid" , "datatypes_bools" , 11 , typeof ( int ) , true , false , true , false , 0 , 0 ) ]
614- [ InlineData ( "Boolean" , "datatypes_bools" , 1 , typeof ( bool ) , false , false , false , true , 0 , 0 ) ]
615- [ InlineData ( "TinyInt1" , "datatypes_bools" , 1 , typeof ( bool ) , false , false , false , true , 0 , 0 ) ]
616- [ InlineData ( "size" , "datatypes_enums" , 7 , typeof ( string ) , false , false , false , true , 0 , 0 ) ]
617- [ InlineData ( "color" , "datatypes_enums" , 6 , typeof ( string ) , false , false , false , false , 0 , 0 ) ]
618- [ InlineData ( "char38" , "datatypes_guids" , 38 , typeof ( string ) , false , false , false , true , 0 , 0 ) ]
619- [ InlineData ( "char38bin" , "datatypes_guids" , 38 , typeof ( string ) , false , false , false , true , 0 , 0 ) ]
620- [ InlineData ( "text" , "datatypes_guids" , 65535 , typeof ( string ) , false , true , false , true , 0 , 0 ) ]
621- [ InlineData ( "blob" , "datatypes_guids" , 65535 , typeof ( byte [ ] ) , false , true , false , true , 0 , 0 ) ]
622- [ InlineData ( "SByte" , "datatypes_integers" , 4 , typeof ( sbyte ) , false , false , false , true , 0 , 0 ) ]
623- [ InlineData ( "Byte" , "datatypes_integers" , 3 , typeof ( byte ) , false , false , false , true , 0 , 0 ) ]
624- [ InlineData ( "Int16" , "datatypes_integers" , 6 , typeof ( short ) , false , false , false , true , 0 , 0 ) ]
625- [ InlineData ( "UInt16" , "datatypes_integers" , 5 , typeof ( ushort ) , false , false , false , true , 0 , 0 ) ]
626- [ InlineData ( "Int24" , "datatypes_integers" , 9 , typeof ( int ) , false , false , false , true , 0 , 0 ) ]
627- [ InlineData ( "UInt24" , "datatypes_integers" , 8 , typeof ( uint ) , false , false , false , true , 0 , 0 ) ]
628- [ InlineData ( "Int32" , "datatypes_integers" , 11 , typeof ( int ) , false , false , false , true , 0 , 0 ) ]
629- [ InlineData ( "UInt32" , "datatypes_integers" , 10 , typeof ( uint ) , false , false , false , true , 0 , 0 ) ]
630- [ InlineData ( "Int64" , "datatypes_integers" , 20 , typeof ( long ) , false , false , false , true , 0 , 0 ) ]
631- [ InlineData ( "UInt64" , "datatypes_integers" , 20 , typeof ( ulong ) , false , false , false , true , 0 , 0 ) ]
632- [ InlineData ( "value" , "datatypes_json_core" , int . MaxValue , typeof ( string ) , false , true , false , true , 0 , 0 ) ]
633- [ InlineData ( "Single" , "datatypes_reals" , 12 , typeof ( float ) , false , false , false , true , 0 , 31 ) ]
634- [ InlineData ( "Double" , "datatypes_reals" , 22 , typeof ( double ) , false , false , false , true , 0 , 31 ) ]
635- [ InlineData ( "SmallDecimal" , "datatypes_reals" , 7 , typeof ( decimal ) , false , false , false , true , 5 , 2 ) ]
636- [ InlineData ( "MediumDecimal" , "datatypes_reals" , 30 , typeof ( decimal ) , false , false , false , true , 28 , 8 ) ]
637- [ InlineData ( "BigDecimal" , "datatypes_reals" , 52 , typeof ( decimal ) , false , false , false , true , 50 , 30 ) ]
638- [ InlineData ( "value" , "datatypes_set" , 12 , typeof ( string ) , false , false , false , true , 0 , 0 ) ]
639- [ InlineData ( "utf8" , "datatypes_strings" , 300 , typeof ( string ) , false , false , false , true , 0 , 0 ) ]
640- [ InlineData ( "utf8bin" , "datatypes_strings" , 300 , typeof ( string ) , false , false , false , true , 0 , 0 ) ]
641- [ InlineData ( "latin1" , "datatypes_strings" , 300 , typeof ( string ) , false , false , false , true , 0 , 0 ) ]
642- [ InlineData ( "latin1bin" , "datatypes_strings" , 300 , typeof ( string ) , false , false , false , true , 0 , 0 ) ]
643- [ InlineData ( "cp1251" , "datatypes_strings" , 300 , typeof ( string ) , false , false , false , true , 0 , 0 ) ]
644- [ InlineData ( "guid" , "datatypes_strings" , 36 , typeof ( Guid ) , false , false , false , true , 0 , 0 ) ]
645- [ InlineData ( "guidbin" , "datatypes_strings" , 36 , typeof ( Guid ) , false , false , false , true , 0 , 0 ) ]
646- [ InlineData ( "Date" , "datatypes_times" , 10 , typeof ( DateTime ) , false , false , false , true , 0 , 0 ) ]
647- [ InlineData ( "DateTime" , "datatypes_times" , 26 , typeof ( DateTime ) , false , false , false , true , 0 , 6 ) ]
648- [ InlineData ( "Timestamp" , "datatypes_times" , 26 , typeof ( DateTime ) , false , false , false , true , 0 , 6 ) ]
649- [ InlineData ( "Time" , "datatypes_times" , 17 , typeof ( TimeSpan ) , false , false , false , true , 0 , 6 ) ]
650- [ InlineData ( "Year" , "datatypes_times" , 4 , typeof ( int ) , false , false , false , true , 0 , 0 ) ]
651- public void GetSchemaTable ( string column , string table , int columnSize , Type dataType , bool isAutoIncrement , bool isLong , bool isKey , bool allowDbNull , int precision , int scale )
603+ [ InlineData ( "Bit1" , "datatypes_bits" , 1 , typeof ( ulong ) , "N" , 0 , 0 ) ]
604+ [ InlineData ( "Bit32" , "datatypes_bits" , 32 , typeof ( ulong ) , "N" , 0 , 0 ) ]
605+ [ InlineData ( "Bit64" , "datatypes_bits" , 64 , typeof ( ulong ) , "N" , 0 , 0 ) ]
606+ [ InlineData ( "Binary" , "datatypes_blobs" , 100 , typeof ( byte [ ] ) , "N" , 0 , 0 ) ]
607+ [ InlineData ( "VarBinary" , "datatypes_blobs" , 100 , typeof ( byte [ ] ) , "N" , 0 , 0 ) ]
608+ [ InlineData ( "TinyBlob" , "datatypes_blobs" , 255 , typeof ( byte [ ] ) , "N" , 0 , 0 ) ]
609+ [ InlineData ( "Blob" , "datatypes_blobs" , 65535 , typeof ( byte [ ] ) , "LN" , 0 , 0 ) ]
610+ [ InlineData ( "MediumBlob" , "datatypes_blobs" , 16777215 , typeof ( byte [ ] ) , "LN" , 0 , 0 ) ]
611+ [ InlineData ( "LongBlob" , "datatypes_blobs" , int . MaxValue , typeof ( byte [ ] ) , "LN" , 0 , 0 ) ]
612+ [ InlineData ( "guidbin" , "datatypes_blobs" , 16 , typeof ( byte [ ] ) , "N" , 0 , 0 ) ]
613+ [ InlineData ( "rowid" , "datatypes_bools" , 11 , typeof ( int ) , "AK" , 0 , 0 ) ]
614+ [ InlineData ( "Boolean" , "datatypes_bools" , 1 , typeof ( bool ) , "N" , 0 , 0 ) ]
615+ [ InlineData ( "TinyInt1" , "datatypes_bools" , 1 , typeof ( bool ) , "N" , 0 , 0 ) ]
616+ [ InlineData ( "size" , "datatypes_enums" , 7 , typeof ( string ) , "N" , 0 , 0 ) ]
617+ [ InlineData ( "color" , "datatypes_enums" , 6 , typeof ( string ) , "" , 0 , 0 ) ]
618+ [ InlineData ( "char38" , "datatypes_guids" , 38 , typeof ( string ) , "N" , 0 , 0 ) ]
619+ [ InlineData ( "char38bin" , "datatypes_guids" , 38 , typeof ( string ) , "N" , 0 , 0 ) ]
620+ [ InlineData ( "text" , "datatypes_guids" , 65535 , typeof ( string ) , "LN" , 0 , 0 ) ]
621+ [ InlineData ( "blob" , "datatypes_guids" , 65535 , typeof ( byte [ ] ) , "LN" , 0 , 0 ) ]
622+ [ InlineData ( "SByte" , "datatypes_integers" , 4 , typeof ( sbyte ) , "N" , 0 , 0 ) ]
623+ [ InlineData ( "Byte" , "datatypes_integers" , 3 , typeof ( byte ) , "N" , 0 , 0 ) ]
624+ [ InlineData ( "Int16" , "datatypes_integers" , 6 , typeof ( short ) , "N" , 0 , 0 ) ]
625+ [ InlineData ( "UInt16" , "datatypes_integers" , 5 , typeof ( ushort ) , "N" , 0 , 0 ) ]
626+ [ InlineData ( "Int24" , "datatypes_integers" , 9 , typeof ( int ) , "N" , 0 , 0 ) ]
627+ [ InlineData ( "UInt24" , "datatypes_integers" , 8 , typeof ( uint ) , "N" , 0 , 0 ) ]
628+ [ InlineData ( "Int32" , "datatypes_integers" , 11 , typeof ( int ) , "N" , 0 , 0 ) ]
629+ [ InlineData ( "UInt32" , "datatypes_integers" , 10 , typeof ( uint ) , "N" , 0 , 0 ) ]
630+ [ InlineData ( "Int64" , "datatypes_integers" , 20 , typeof ( long ) , "N" , 0 , 0 ) ]
631+ [ InlineData ( "UInt64" , "datatypes_integers" , 20 , typeof ( ulong ) , "N" , 0 , 0 ) ]
632+ [ InlineData ( "value" , "datatypes_json_core" , int . MaxValue , typeof ( string ) , "LN" , 0 , 0 ) ]
633+ [ InlineData ( "Single" , "datatypes_reals" , 12 , typeof ( float ) , "N" , 0 , 31 ) ]
634+ [ InlineData ( "Double" , "datatypes_reals" , 22 , typeof ( double ) , "N" , 0 , 31 ) ]
635+ [ InlineData ( "SmallDecimal" , "datatypes_reals" , 7 , typeof ( decimal ) , "N" , 5 , 2 ) ]
636+ [ InlineData ( "MediumDecimal" , "datatypes_reals" , 30 , typeof ( decimal ) , "N" , 28 , 8 ) ]
637+ [ InlineData ( "BigDecimal" , "datatypes_reals" , 52 , typeof ( decimal ) , "N" , 50 , 30 ) ]
638+ [ InlineData ( "value" , "datatypes_set" , 12 , typeof ( string ) , "N" , 0 , 0 ) ]
639+ [ InlineData ( "utf8" , "datatypes_strings" , 300 , typeof ( string ) , "N" , 0 , 0 ) ]
640+ [ InlineData ( "utf8bin" , "datatypes_strings" , 300 , typeof ( string ) , "N" , 0 , 0 ) ]
641+ [ InlineData ( "latin1" , "datatypes_strings" , 300 , typeof ( string ) , "N" , 0 , 0 ) ]
642+ [ InlineData ( "latin1bin" , "datatypes_strings" , 300 , typeof ( string ) , "N" , 0 , 0 ) ]
643+ [ InlineData ( "cp1251" , "datatypes_strings" , 300 , typeof ( string ) , "N" , 0 , 0 ) ]
644+ [ InlineData ( "guid" , "datatypes_strings" , 36 , typeof ( Guid ) , "N" , 0 , 0 ) ]
645+ [ InlineData ( "guidbin" , "datatypes_strings" , 36 , typeof ( Guid ) , "N" , 0 , 0 ) ]
646+ [ InlineData ( "Date" , "datatypes_times" , 10 , typeof ( DateTime ) , "N" , 0 , 0 ) ]
647+ [ InlineData ( "DateTime" , "datatypes_times" , 26 , typeof ( DateTime ) , "N" , 0 , 6 ) ]
648+ [ InlineData ( "Timestamp" , "datatypes_times" , 26 , typeof ( DateTime ) , "N" , 0 , 6 ) ]
649+ [ InlineData ( "Time" , "datatypes_times" , 17 , typeof ( TimeSpan ) , "N" , 0 , 6 ) ]
650+ [ InlineData ( "Year" , "datatypes_times" , 4 , typeof ( int ) , "N" , 0 , 0 ) ]
651+ public void GetSchemaTable ( string column , string table , int columnSize , Type dataType , string flags , int precision , int scale )
652652 {
653653 if ( table == "datatypes_json_core" && ! AppConfig . SupportsJson )
654654 return ;
655655
656+ var isAutoIncrement = flags . IndexOf ( 'A' ) != - 1 ;
657+ var isKey = flags . IndexOf ( 'K' ) != - 1 ;
658+ var isLong = flags . IndexOf ( 'L' ) != - 1 ;
659+ var allowDbNull = flags . IndexOf ( 'N' ) != - 1 ;
660+
656661 using ( var command = m_database . Connection . CreateCommand ( ) )
657662 {
658663 command . CommandText = $ "select `{ column } ` from `{ table } `;";
0 commit comments