Small Fixes (#11236)

- Left over from the last PR.
- Widget for `headers` in `URL.fetch` extension.
- Fix `Left` and Right` to allow columns or expressions in it.
This commit is contained in:
James Dunkerley 2024-10-02 19:57:02 +01:00 committed by GitHub
parent 0399a4570d
commit a2c853c6e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 8 additions and 7 deletions

View File

@ -447,7 +447,7 @@ key_widget dict:Dictionary -> Widget =
## PRIVATE ## PRIVATE
key_value_widget -> Widget = 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' default = 'pair "key" Nothing'
pair = Option "Pair" fqn+".pair" [["first", make_all_selector], ["second", make_all_selector]] pair = Option "Pair" fqn+".pair" [["first", make_all_selector], ["second", make_all_selector]]
item_editor = Single_Choice display=..Always values=[pair] item_editor = Single_Choice display=..Always values=[pair]

View File

@ -429,7 +429,7 @@ make_enso object =
## PRIVATE ## PRIVATE
key_value_widget : Widget key_value_widget : Widget
key_value_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' default = 'pair "key" Nothing'
pair = Option "Pair" fqn+".pair" [["first", Text_Input], ["second", make_all_selector]] pair = Option "Pair" fqn+".pair" [["first", Text_Input], ["second", make_all_selector]]
item_editor = Single_Choice display=..Always values=[pair] item_editor = Single_Choice display=..Always values=[pair]

View File

@ -43,6 +43,7 @@ Text.to_uri self = URI.parse self
Defaults to `Auto_Detect`. If `Raw_Response` is selected or if the format Defaults to `Auto_Detect`. If `Raw_Response` is selected or if the format
cannot be determined automatically, a raw HTTP `Response` will be returned. cannot be determined automatically, a raw HTTP `Response` will be returned.
@format Data_Read_Helpers.format_widget_with_raw_response @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 : HTTP_Method -> Vector (Header | Pair Text Text) -> File_Format -> Any
URI.fetch self (method:HTTP_Method=..Get) headers=[] format=Auto_Detect = URI.fetch self (method:HTTP_Method=..Get) headers=[] format=Auto_Detect =
Data.fetch self method headers format Data.fetch self method headers format

View File

@ -84,7 +84,7 @@ make_all_with_json =
## PRIVATE ## PRIVATE
dictionary_widget -> Widget = 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" ""' default = 'pair "key" ""'
value_editor = Single_Choice display=..Always values=[Option "Text" '""', Option "File" "File.new ''"] value_editor = Single_Choice display=..Always values=[Option "Text" '""', Option "File" "File.new ''"]
pair = Option "Pair" fqn+".pair" [["first", Text_Input], ["second", value_editor]] pair = Option "Pair" fqn+".pair" [["first", Text_Input], ["second", value_editor]]

View File

@ -22,7 +22,7 @@ type Connection_Options
Widget to design connection options. Widget to design connection options.
default_widget : Widget default_widget : Widget
default_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"' default = 'pair "key" "value"'
pair = Option "Pair" fqn+".pair" [["first", Text_Input], ["second", make_text_secret_selector]] pair = Option "Pair" fqn+".pair" [["first", Text_Input], ["second", make_text_secret_selector]]
item_editor = Single_Choice display=..Always values=[pair] item_editor = Single_Choice display=..Always values=[pair]

View File

@ -103,7 +103,7 @@ type DB_Column
info : Table info : Table
info self -> Table = self.to_table.column_info info self -> Table = self.to_table.column_info
## ALIAS load, import ## ALIAS import, load
GROUP Standard.Base.Input GROUP Standard.Base.Input
ICON data_input ICON data_input
Returns a materialized column containing rows of this column. Returns a materialized column containing rows of this column.

View File

@ -94,10 +94,10 @@ type Simple_Expression
## Defines a set of Text based operations. ## Defines a set of Text based operations.
type Text_Operation type Text_Operation
## Takes the first characters from the input column. ## 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. ## 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. ## Returns the character length of the input column.
Length Length