Exemple #1
0
def get_schema():
    repository = Index("repository", column_label="repo_id")
    stargazer = repository.frame("stargazer",
                                 row_label="stargazer_id",
                                 time_quantum=TimeQuantum.YEAR_MONTH_DAY,
                                 inverse_enabled=True)
    language = repository.frame("language",
                                row_label="language_id",
                                inverse_enabled=True)

    return repository, stargazer, language
Exemple #2
0
 def test_create_frame(self):
     db = Index("foo")
     frame = db.frame("sample-frame")
     self.assertEqual(db, frame.index)
     self.assertEqual("sample-frame", frame.name)
     self.assertEqual("rowID", frame.row_label)
     self.assertEqual(TimeQuantum.NONE, frame.time_quantum)