Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit ce66eb1

Browse files
committed
Small fix to boolean
1 parent b4073db commit ce66eb1

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

sqeleton/abcs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
NumericType,
1010
PrecisionType,
1111
StringType,
12+
Boolean,
1213
)
1314
from .compiler import AbstractCompiler, Compilable

sqeleton/abcs/database_types.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class PrecisionType(ColType):
2424

2525

2626
class Boolean(ColType):
27-
supported = True
27+
precision = 0
2828

2929

3030
class TemporalType(PrecisionType):
@@ -42,6 +42,7 @@ class TimestampTZ(TemporalType):
4242
class Datetime(TemporalType):
4343
pass
4444

45+
4546
class Date(TemporalType):
4647
pass
4748

sqeleton/databases/_connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def connect_to_uri(self, db_uri: str, thread_count: Optional[int] = 1) -> Databa
146146
with open(toml_path) as f:
147147
config = toml.load(f)
148148
try:
149-
conn_dict = config['database'][database]
149+
conn_dict = config["database"][database]
150150
except KeyError:
151151
raise ValueError(f"Cannot find database config named '{database}'.")
152152
return self.connect_with_dict(conn_dict, thread_count)

sqeleton/queries/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def max_(expr: Expr):
112112

113113
def if_(cond: Expr, then: Expr, else_: Optional[Expr] = None):
114114
"""Conditional expression, shortcut to when-then-else.
115-
115+
116116
Example:
117117
::
118118
@@ -124,7 +124,7 @@ def if_(cond: Expr, then: Expr, else_: Optional[Expr] = None):
124124

125125
def when(*when_exprs: Expr):
126126
"""Start a when-then expression
127-
127+
128128
Example:
129129
::
130130

0 commit comments

Comments
 (0)