首先,在 EGLWeb 專案的 EGLSource 資料夾中有數個新的 EGL 套件,其中包括 eglderbydb.data、eglderbydb.access 和 eglderbydb.primitivetypes.data。套件的運作與資料夾相似:它們包含原始碼檔案,並將這些檔案組織成有意義的群組。在此情況下,eglderbydb.data 套件保留記錄,eglderbydb.access 套件保留程式庫,eglderbydb.primitivetypes.data 套件保留「資料項目」。
dataitem CustomerId INT end在此情況下,ID 號碼欄位基於整數初始類型。 「資料項目」可以具有其他內容,以指定詳細資料,例如其值的有效範圍和應該如何在使用者介面中將其格式化。
record Customer type sqlRecord {
tablenames=[["EGL.CUSTOMER"]],
fieldsMatchColumns = yes,
keyItems=[CUSTOMERID]
}
CUSTOMERID CUSTOMERID {column="CUSTOMERID"};
FIRSTNAME FIRSTNAME {column="FIRSTNAME",
sqlVariableLen=yes, maxLen=30, isSqlNullable=yes};
LASTNAME LASTNAME {column="LASTNAME",
sqlVariableLen=yes, maxLen=30, isSqlNullable=yes};
...
end