Skip to content

Commit

Permalink
Replacing Lazy.Lazy with ~lazy atom field
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Apr 5, 2023
1 parent cad4e8e commit 39819fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 79 deletions.
75 changes: 0 additions & 75 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Runtime/Lazy.enso

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from Standard.Base import all
import Standard.Base.Errors.Illegal_State.Illegal_State
import Standard.Base.Runtime.Lazy.Lazy

import project.Connection.Connection.Connection
import project.Data.SQL_Type.SQL_Type
Expand All @@ -14,7 +13,7 @@ type SQL_Type_Reference

Since fetching this type requires querying the database, it is computed
lazily and cached.
Computed_By_Database (lazy_ref : Lazy)
Computed_By_Database ~lazy_ref

## Refers to an SQL type that is overridden by the dialect's type system.
Overridden (value : SQL_Type)
Expand Down Expand Up @@ -51,7 +50,7 @@ type SQL_Type_Reference
columns = connection.jdbc_connection.fetch_columns statement statement_setter
only_column = columns.first
only_column.second
SQL_Type_Reference.Computed_By_Database (Lazy.new do_fetch)
SQL_Type_Reference.Computed_By_Database do_fetch

## PRIVATE
Creates a new `SQL_Type_Reference` that should never be used.
Expand All @@ -61,7 +60,7 @@ type SQL_Type_Reference
null =
getter =
Error.throw (Illegal_State.Error "Getting the SQL_Type from SQL_Type_Reference.null is not allowed. This indicates a bug in the Database library.")
SQL_Type_Reference.Computed_By_Database (Lazy.new getter)
SQL_Type_Reference.Computed_By_Database getter

## PRIVATE
Turns this reference into a type override.
Expand Down

0 comments on commit 39819fa

Please sign in to comment.