#
# This is a Template-File for WWWdb
#
#
#

# --- Description of the data to access -----------------------------------------
[Data]
Table    = pg_proc
Order    = proname

UpdFields = proname, prolang, proargtypes, prorettype, prosrc
QryFields = proname, prolang, proargtypes, prorettype
ExtraFields = oid, proargtypes_resolv

; IdField = proname, proargtypes
IdField = oid, proname, proargtypes

[Cache]
Timeout         = 0

# --- Configuring the browser here ----------------------------------------------
[Browser]
MaxRows = 25

[Qry]
BgColor2    = #fafafa
NrOfColLine = 2
SelType     = Link


# --- General header for WWWdb --------------------------------------------------
[Header]
Title = "Edit PostgreSQL - Procedures"

# --- User-specific gui definitions ---------------------------------------------
[GUI]

# --- Definition of the different states ----------------------------------------

# Buttons for all states
# please note that "-" deactivates a Button
[State All]
BtnCancel  = ""
BtnHelp    = ""
BtnExit    = ""

# This is the state when the form is called the first time, or the Back-button
# is pressed
[State Init]
; Header = <Heading for initial-state>
BtnNew     = ""
BtnQry     = ""
BtnImpInit = Import
BtnProto   = Prototype

# In this state you have selected a record, which you can update or delete
[State Work]
; Header = <Text for work-state>
BtnUpd     = ""
BtnDel     = ""
BtnView    = Preview
BtnImpWork = Import

# This is the record-Browser
[State Qry]
; Header = <Text for query-state>

# --- Layout for the area, the data is shown ------------------------------------
[Layout Table]
; LinkWidth = <Width of link-box in pixels>
; Border      = <Border-Width>
; BgColor     = <Background-color of table>

# --- Here are the examples for the single fields -------------------------------

[Layout Qry _link]
Text = ""
Type = Ref
Value = ">>"
Align = Right

[Layout Label export_file]
Pos = +1.+0.+0
Text = "Export-file:"
Align = Right
Bold = Yes

[Layout Field export_file]
Pos = +0.+1.+0
Type = Ref
Value = "->"
SafeText = Yes

[Layout Field oid]
Pos = +0.+0.+1
Type = Hidden

[Layout Label proname]
Pos = +1.0.0
Text = "Name: "
Align = Right
Bold = Yes
Big = Yes
BgColor = "#eeeeee"

[Layout Field proname]
Pos = +0.+1.+0
Type = Text
Size = 50
Mandatory = Yes
BgColor = "#eeeeee"
Bold = Yes
Big = Yes

[Layout Label proargtypes]
Pos = +1.0.0
Text = "Parameters: "
Align = Right
Bold = Yes

[Layout Field proargtypes_resolv]
Pos = +0.+1.+0
Size = 55
Type = Text

[Layout Field proargtypes]
Pos = +0.+0.+1
Type = Hidden


[Layout Label proargs]
Pos = +1.0.0
Text = "Test-Args.: "
Align = Right
Bold = Yes

[Layout Field proargs]
Pos = +0.+1.+0
Size = 55

[Layout Field DoTest]
Pos = +0.+0.+1
Type = Btn
Text = "Run Test"

[Layout Label prorettype]
Pos = +1.0.0
Text = "Result-type: "
Align = Right
Bold = Yes

[Layout Field prorettype]
Pos = +0.+1.+0
Type        = Select
Values      = <<EOF
SELECT oid, typname
FROM pg_type
WHERE
    typname NOT LIKE 'pg\\_%' AND
    typname NOT LIKE '\\_%'
ORDER BY typname
EOF

[Layout Label prolang]
Pos = +1.0.0
Text = "Language: "
Align = Right
Bold = Yes

[Layout Field prolang]
Pos = +0.+1.0
Mandatory = Yes
Type        = Select
Values      = <<EOF
SELECT oid, lanname
FROM pg_language
ORDER BY lanname
EOF


[Layout Label prosrc]
Pos = +1.0.0
Text = "Source-code: "
Align = Right
VAlign = Top
Bold = Yes

[Layout Field prosrc]
Pos = +0.+1.0
Type = Area
Size = 80
Rows = 30
Mandatory = Yes

[Layout Label import_file]
Pos = +1.0.0
Text = "Import-File: "
Align = Right
VAlign = Top
Bold = Yes

[Layout Field import_file]
Pos = +0.+1.0
Type = File
Size = 50
MaxLength = 512000
Accept = "text/x-sql"

