@@ -63,17 +63,17 @@ public SybaseSQLAnywhere10Dialect()
6363
6464 protected virtual void RegisterCharacterTypeMappings ( )
6565 {
66- RegisterColumnType ( DbType . AnsiStringFixedLength , "CHAR(1 )" ) ;
66+ RegisterColumnType ( DbType . AnsiStringFixedLength , "CHAR(255 )" ) ;
6767 RegisterColumnType ( DbType . AnsiStringFixedLength , 32767 , "CHAR($l)" ) ;
68- RegisterColumnType ( DbType . AnsiString , "VARCHAR(1 )" ) ;
68+ RegisterColumnType ( DbType . AnsiString , "VARCHAR(255 )" ) ;
6969 RegisterColumnType ( DbType . AnsiString , 32767 , "VARCHAR($l)" ) ;
7070 RegisterColumnType ( DbType . AnsiString , 2147483647 , "LONG VARCHAR" ) ;
71- RegisterColumnType ( DbType . StringFixedLength , "NCHAR(1 )" ) ;
71+ RegisterColumnType ( DbType . StringFixedLength , "NCHAR(255 )" ) ;
7272 RegisterColumnType ( DbType . StringFixedLength , 32767 , "NCHAR($l)" ) ;
73- RegisterColumnType ( DbType . String , "NVARCHAR(1 )" ) ;
73+ RegisterColumnType ( DbType . String , "NVARCHAR(255 )" ) ;
7474 RegisterColumnType ( DbType . String , 32767 , "NVARCHAR($l)" ) ;
7575 RegisterColumnType ( DbType . String , 2147483647 , "LONG NVARCHAR" ) ;
76- RegisterColumnType ( DbType . Binary , "BINARY(1 )" ) ;
76+ RegisterColumnType ( DbType . Binary , "BINARY(8000 )" ) ;
7777 RegisterColumnType ( DbType . Binary , 32767 , "VARBINARY($l)" ) ;
7878 RegisterColumnType ( DbType . Binary , 2147483647 , "LONG BINARY" ) ;
7979 RegisterColumnType ( DbType . Guid , "UNIQUEIDENTIFIER" ) ;
@@ -344,8 +344,124 @@ protected virtual void RegisterMiscellaneousFunctions()
344344 RegisterFunction ( "watcomsql" , new StandardSQLFunction ( "watcomsql" , NHibernateUtil . String ) ) ;
345345 }
346346
347+ #region private static readonly string[] DialectKeywords = { ... }
348+
349+ private static readonly string [ ] DialectKeywords =
350+ {
351+ "aes_decrypt" ,
352+ "asc" ,
353+ "attach" ,
354+ "backup" ,
355+ "bit" ,
356+ "bottom" ,
357+ "break" ,
358+ "capability" ,
359+ "cascade" ,
360+ "char_convert" ,
361+ "checkpoint" ,
362+ "clear" ,
363+ "comment" ,
364+ "compressed" ,
365+ "conflict" ,
366+ "convert" ,
367+ "dbspace" ,
368+ "deleting" ,
369+ "desc" ,
370+ "detach" ,
371+ "elseif" ,
372+ "encrypted" ,
373+ "endif" ,
374+ "exception" ,
375+ "existing" ,
376+ "externlogin" ,
377+ "force" ,
378+ "forward" ,
379+ "goto" ,
380+ "holdlock" ,
381+ "identified" ,
382+ "index" ,
383+ "inserting" ,
384+ "install" ,
385+ "instead" ,
386+ "integrated" ,
387+ "iq" ,
388+ "isolation" ,
389+ "json" ,
390+ "kerberos" ,
391+ "key" ,
392+ "lock" ,
393+ "login" ,
394+ "long" ,
395+ "membership" ,
396+ "message" ,
397+ "mode" ,
398+ "modify" ,
399+ "noholdlock" ,
400+ "notify" ,
401+ "nvarchar" ,
402+ "off" ,
403+ "openstring" ,
404+ "openxml" ,
405+ "option" ,
406+ "options" ,
407+ "others" ,
408+ "passthrough" ,
409+ "print" ,
410+ "privileges" ,
411+ "proc" ,
412+ "publication" ,
413+ "raiserror" ,
414+ "readtext" ,
415+ "reference" ,
416+ "refresh" ,
417+ "remote" ,
418+ "remove" ,
419+ "rename" ,
420+ "reorganize" ,
421+ "resource" ,
422+ "restore" ,
423+ "restrict" ,
424+ "rowtype" ,
425+ "save" ,
426+ "session" ,
427+ "setuser" ,
428+ "share" ,
429+ "spatial" ,
430+ "sqlcode" ,
431+ "stop" ,
432+ "subtrans" ,
433+ "subtransaction" ,
434+ "synchronize" ,
435+ "temporary" ,
436+ "timeline" ,
437+ "tinyint" ,
438+ "truncate" ,
439+ "tsequal" ,
440+ "unbounded" ,
441+ "uniqueidentifier" ,
442+ "unsigned" ,
443+ "updating" ,
444+ "validate" ,
445+ "varbinary" ,
446+ "varbit" ,
447+ "variable" ,
448+ "varray" ,
449+ "view" ,
450+ "wait" ,
451+ "waitfor" ,
452+ "work" ,
453+ "writetext" ,
454+ "xml" ,
455+ } ;
456+
457+ #endregion
458+
347459 protected virtual void RegisterKeywords ( )
348460 {
461+ // Register driver returned keywords for SQL Anywhere 16
462+ RegisterKeywords ( DialectKeywords ) ;
463+
464+ // Keywords originally registered for SQL Anywhere 10 (none are in the above list)
349465 RegisterKeyword ( "top" ) ;
350466 RegisterKeyword ( "first" ) ;
351467 RegisterKeyword ( "fetch" ) ;
0 commit comments