Skip to content

Commit c698d35

Browse files
committed
feat(mssql): add a bunch of missing types
1 parent 490f8b4 commit c698d35

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ibis/backends/base/sql/alchemy/datatypes.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ def sa_integer(_, satype, nullable=True):
232232

233233

234234
@dt.dtype.register(Dialect, mysql.TINYINT)
235+
@dt.dtype.register(MSDialect, mssql.TINYINT)
235236
def sa_mysql_tinyint(_, satype, nullable=True):
236237
return dt.Int8(nullable=nullable)
237238

@@ -242,10 +243,16 @@ def sa_mysql_bit(_, satype, nullable=True):
242243

243244

244245
@dt.dtype.register(Dialect, sa.types.BigInteger)
246+
@dt.dtype.register(MSDialect, mssql.MONEY)
245247
def sa_bigint(_, satype, nullable=True):
246248
return dt.Int64(nullable=nullable)
247249

248250

251+
@dt.dtype.register(MSDialect, mssql.SMALLMONEY)
252+
def sa_mssql_smallmoney(_, satype, nullable=True):
253+
return dt.Int32(nullable=nullable)
254+
255+
249256
@dt.dtype.register(Dialect, sa.REAL)
250257
def sa_real(_, satype, nullable=True):
251258
return dt.Float32(nullable=nullable)
@@ -259,10 +266,16 @@ def sa_double(_, satype, nullable=True):
259266

260267

261268
@dt.dtype.register(PGDialect, postgresql.UUID)
269+
@dt.dtype.register(MSDialect, mssql.UNIQUEIDENTIFIER)
262270
def sa_uuid(_, satype, nullable=True):
263271
return dt.UUID(nullable=nullable)
264272

265273

274+
@dt.dtype.register(MSDialect, (mssql.BINARY, mssql.TIMESTAMP))
275+
def sa_mssql_timestamp(_, satype, nullable=True):
276+
return dt.Binary(nullable=nullable)
277+
278+
266279
@dt.dtype.register(PGDialect, postgresql.MACADDR)
267280
def sa_macaddr(_, satype, nullable=True):
268281
return dt.MACADDR(nullable=nullable)

0 commit comments

Comments
 (0)