24 require_once
'HypertableConnection.php';
25 require_once
'TweetTable.php';
50 "(CELL = '$id','following:$other' ".
51 "OR CELL = '$other','followers:$id')");
52 $following_timestamp=$result->cells[0]->key->timestamp;
53 $followers_timestamp=$result->cells[1]->key->timestamp;
65 "(CELL = '$id','following:$other' ".
66 "OR CELL = '$other','followers:$id')");
67 $following_timestamp=$result->cells[0]->key->timestamp;
68 $followers_timestamp=$result->cells[1]->key->timestamp;
72 $following_timestamp);
74 $followers_timestamp);
87 "user WHERE ROW='".$this->_id.
"'");
88 if (!$result || count($result->cells)==0)
90 return $result->cells[0]->value;
97 $t=
"AND TIMESTAMP < '".
102 "WHERE ROW='$id' $t CELL_LIMIT $limit");
103 if (!$result or !count($result->cells))
105 foreach ($result->cells as $cell) {
106 array_push($a, $cell->value);
108 $this->_cutoff=$result->cells[count($result->cells)-1]->key->timestamp;
115 "user WHERE ROW='$id'");
118 return count($result->cells);
123 "user WHERE ROW='".$this->_id.
"'");
124 if (!$result || count($result->cells)==0)
126 return $result->cells[0]->value;
133 $t=
"AND TIMESTAMP < '".
138 "WHERE ROW='$id' $t CELL_LIMIT $limit");
139 if (!$result or !count($result->cells))
141 foreach ($result->cells as $cell) {
142 array_push($a, $cell->value);
144 $this->_cutoff=$result->cells[count($result->cells)-1]->key->timestamp;
149 $tid=$tweet->getId();
162 "user WHERE ROW='".$this->_id.
"'");
165 foreach ($result->cells as $cell) {
166 $qualifier=$cell->key->column_qualifier;
176 "user WHERE ROW='".$this->_id.
"'");
177 if (!$result || !count($result->cells))
179 return $result->cells[0]->value;
186 $t=
"AND TIMESTAMP < '".
191 "WHERE ROW='$id' $t CELL_LIMIT $limit");
192 if (!$result or !count($result->cells))
194 foreach ($result->cells as $cell) {
197 $this->_cutoff=$result->cells[count($result->cells)-1]->key->timestamp;
203 "user WHERE ROW='".$this->_id.
"'");
204 if (!$result || !count($result->cells))
206 return $result->cells[0]->value;
213 $t=
"AND TIMESTAMP < '".
218 "WHERE ROW='$id' $t CELL_LIMIT $limit");
219 if (!$result or !count($result->cells))
221 foreach ($result->cells as $cell) {
224 $this->_cutoff=$result->cells[count($result->cells)-1]->key->timestamp;
static insert($table, $row, $column, $value, $timestamp=0)
getMyStream($cutoff_time, $limit)
static delete($table, $row, $column, $timestamp=0)
static format_timestamp_ns($ts)
getFollowStream($cutoff_time, $limit)
Copyright (C) 2007-2015 Hypertable, Inc.
getFollowers($cutoff_time, $limit)
getFollowing($cutoff_time, $limit)