Skip to content

Commit

Permalink
Small Fixes (#11236)
Browse files Browse the repository at this point in the history
- Left over from the last PR.
- Widget for `headers` in `URL.fetch` extension.
- Fix `Left` and Right` to allow columns or expressions in it.
  • Loading branch information
jdunkerley authored Oct 2, 2024
1 parent 0399a45 commit a2c853c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ key_widget dict:Dictionary -> Widget =

## PRIVATE
key_value_widget -> Widget =
fqn = Meta.get_qualified_type_name Pair . drop (..Last 5)
fqn = Meta.get_qualified_type_name Pair . take (..Before_Last '.')
default = 'pair "key" Nothing'
pair = Option "Pair" fqn+".pair" [["first", make_all_selector], ["second", make_all_selector]]
item_editor = Single_Choice display=..Always values=[pair]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ make_enso object =
## PRIVATE
key_value_widget : Widget
key_value_widget =
fqn = Meta.get_qualified_type_name Pair . drop (..Last 5)
fqn = Meta.get_qualified_type_name Pair . take (..Before_Last '.')
default = 'pair "key" Nothing'
pair = Option "Pair" fqn+".pair" [["first", Text_Input], ["second", make_all_selector]]
item_editor = Single_Choice display=..Always values=[pair]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Text.to_uri self = URI.parse self
Defaults to `Auto_Detect`. If `Raw_Response` is selected or if the format
cannot be determined automatically, a raw HTTP `Response` will be returned.
@format Data_Read_Helpers.format_widget_with_raw_response
@headers Header.default_widget
URI.fetch : HTTP_Method -> Vector (Header | Pair Text Text) -> File_Format -> Any
URI.fetch self (method:HTTP_Method=..Get) headers=[] format=Auto_Detect =
Data.fetch self method headers format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ make_all_with_json =

## PRIVATE
dictionary_widget -> Widget =
fqn = Meta.get_qualified_type_name Pair . drop (..Last 5)
fqn = Meta.get_qualified_type_name Pair . take (..Before_Last '.')
default = 'pair "key" ""'
value_editor = Single_Choice display=..Always values=[Option "Text" '""', Option "File" "File.new ''"]
pair = Option "Pair" fqn+".pair" [["first", Text_Input], ["second", value_editor]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Connection_Options
Widget to design connection options.
default_widget : Widget
default_widget =
fqn = Meta.get_qualified_type_name Pair . drop (..Last 5)
fqn = Meta.get_qualified_type_name Pair . take (..Before_Last '.')
default = 'pair "key" "value"'
pair = Option "Pair" fqn+".pair" [["first", Text_Input], ["second", make_text_secret_selector]]
item_editor = Single_Choice display=..Always values=[pair]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type DB_Column
info : Table
info self -> Table = self.to_table.column_info

## ALIAS load, import
## ALIAS import, load
GROUP Standard.Base.Input
ICON data_input
Returns a materialized column containing rows of this column.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ type Simple_Expression
## Defines a set of Text based operations.
type Text_Operation
## Takes the first characters from the input column.
Left (length : Integer = 1)
Left (length : Column_Ref|Expression|Integer = 1)

## Takes the first characters from the input column.
Right (length : Integer = 1)
Right (length : Column_Ref|Expression|Integer = 1)

## Returns the character length of the input column.
Length
Expand Down

0 comments on commit a2c853c

Please sign in to comment.