Skip to content

Commit

Permalink
sqlite: decimal -> real
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Jan 24, 2024
1 parent c9f5747 commit c69430c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/sqlite/def/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn parse_type(data_type: &str) -> Result<ColumnType, ParseIntError> {
"bigint" => ColumnType::BigInteger,
"float" => ColumnType::Float,
"double" => ColumnType::Double,
"decimal_text" => ColumnType::Decimal(if parts.len() == 2 {
"real" => ColumnType::Decimal(if parts.len() == 2 {
Some((parts[0], parts[1]))
} else {
None
Expand Down
4 changes: 2 additions & 2 deletions tests/live/sqlite/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ async fn test_002() -> DiscoveryResult<()> {
[
r#"CREATE TABLE "order" ("#,
r#""id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,"#,
r#""total" decimal_text,"#,
r#""total" real,"#,
r#""bakery_id" integer NOT NULL,"#,
r#""customer_id" integer NOT NULL,"#,
r#""placed_at" datetime_text NOT NULL DEFAULT CURRENT_TIMESTAMP,"#,
Expand All @@ -298,7 +298,7 @@ async fn test_002() -> DiscoveryResult<()> {
[
r#"CREATE TABLE "lineitem" ("#,
r#""id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,"#,
r#""price" decimal_text,"#,
r#""price" real,"#,
r#""quantity" integer,"#,
r#""order_id" integer NOT NULL,"#,
r#""cake_id" integer NOT NULL,"#,
Expand Down

0 comments on commit c69430c

Please sign in to comment.