@@ -200,6 +200,9 @@ def visit_unique_constraint(self, constraint, **kw):
200200 )
201201 return
202202
203+ def visit_create_index (self , create , ** kw ):
204+ return "SELECT 1;"
205+
203206
204207class CrateTypeCompiler (compiler .GenericTypeCompiler ):
205208 def visit_string (self , type_ , ** kw ):
@@ -254,6 +257,30 @@ def visit_TIMESTAMP(self, type_, **kw):
254257 """
255258 return "TIMESTAMP %s" % ((type_ .timezone and "WITH" or "WITHOUT" ) + " TIME ZONE" ,)
256259
260+ def visit_BLOB (self , type_ , ** kw ):
261+ return "STRING"
262+
263+ def visit_FLOAT (self , type_ , ** kw ):
264+ """
265+ From `sqlalchemy.sql.sqltypes.Float`.
266+
267+ When a :paramref:`.Float.precision` is not provided in a
268+ :class:`_types.Float` type some backend may compile this type as
269+ an 8 bytes / 64 bit float datatype. To use a 4 bytes / 32 bit float
270+ datatype a precision <= 24 can usually be provided or the
271+ :class:`_types.REAL` type can be used.
272+ This is known to be the case in the PostgreSQL and MSSQL dialects
273+ that render the type as ``FLOAT`` that's in both an alias of
274+ ``DOUBLE PRECISION``. Other third party dialects may have similar
275+ behavior.
276+ """
277+ if not type_ .precision :
278+ return "FLOAT"
279+ elif type_ .precision <= 24 :
280+ return "FLOAT"
281+ else :
282+ return "DOUBLE"
283+
257284
258285class CrateCompiler (compiler .SQLCompiler ):
259286 def visit_getitem_binary (self , binary , operator , ** kw ):
0 commit comments