2

我正在检查 WTF 超级列,并尝试制作类似示例的表格。什么都没有出现。如果格式看起来像这样,我很好奇如何创建表格。

    AddressBook = { // this is a ColumnFamily of type Super
                     phatduckk: {    // this is the key to this row inside the Super CF
                     // the key here is the name of the owner of the address book

                     // now we have an infinite # of super columns in this row
                     // the keys inside the row are the names for the SuperColumns
                     // each of these SuperColumns is an address book entry
                    friend1: {street: "8th street", zip: "90210", city: "Beverley Hills", state: "CA"},

    // this is the address book entry for John in phatduckk's address book
                    John: {street: "Howard street", zip: "94404", city: "FC", state: "CA"},
                     Kim: {street: "X street", zip: "87876", city: "Balls", state: "VA"},
                     Tod: {street: "Jerry street", zip: "54556", city: "Cartoon", state: "CO"},
                     Bob: {street: "Q Blvd", zip: "24252", city: "Nowhere", state: "MN"},
    ...
    // we can have an infinite # of ScuperColumns (aka address book entries)
                  }, // end row
    // all the address book entries for ieure
                      ieure: {     // this is the key to another row in the Super CF
                              joey: {street: "A ave", zip: "55485", city: "Hell", state: "NV"},
                       William: {street: "Armpit Dr", zip: "93301", city: "Bakersfield", state: "CA"},
},

}

我相信我必须创建列族和超级列族。先感谢您。

4

1 回答 1

0

不要使用超列,因为它们已被弃用。而是使用复合列,如下所示:

AddressBook {
    User1 {
        Friend1:street : "some st"
        Friend1:zip : 30000
        Friend1:city : "mayberry"
        Friend1:state : "ST"
        Friend2:street : "some other st"
        Friend2:zip : 30001
        Friend2:city : "springfield"
        Friend2:state : "ST"
    },
    User2 {
        ...
    }
}
于 2012-08-30T18:27:42.937 回答