Hello, all!
I have a class that looks like this:
class FullAddress has // sorry for the "has"; I use it in pseudocode to mean 'consisting of the following fields'.
AddressID as integer
BuildingName as string
StreetAddress() as string
Ward as string // for my Japanese buddies
City as string
Province as string
PostalCode as string
Nation as string
end class // FullAddress
I can translate into SQL some of FullAddress, i.e.,
CREATE TABLE FullAddress
(
AddressID INTEGER PRIMARY KEY
BuildingName TEXT,
Ward TEXT,
City TEXT,
Province TEXT,
Nation TEXT,
PostalCode TEXT,
)
But I am lost with StreetAddress(). Is there a way to translate such an array into SQL? I expect that I will have to limit StreetAddress to three lines, e.g.,
StreetAddressMain TEXT, // the building number and street name, e.g., "10 Plateau Place"
StreetAddressUnit TEXT, // the apartment number, e.g., "Apt. 6" and "Unit H"
StreetAddressExtra TEXT, // in case there is extra information pertinent to the address
And do likewise to the class definition, i.e.,
class FullAddress has
AddressID as integer
BuildingName as string
StreetAddressMain as string
StreetAddressUnit as string
StreetAddressExtra as string
Ward as string
City as string
Province as string
Nation as string
PostalCode as string,
end class // FullAddress
My apologies for using the wrong Xojo terms and syntax.
Many thanks.