コード例 #1
0
    def setUp(self):
        self.conn = create_sqlite_table()

        self.table = sql_table(
            'testtable',
            ['i', 'msg', 'price'],
            [dshape('int32'), dshape('string'), dshape('float64')],
            self.conn)

        self.col_i = sql_column('testtable', 'i',
                                dshape('3 * int32'),
                                self.conn)
        self.col_msg = sql_column('testtable', 'msg',
                                  dshape('3 * string'),
                                  self.conn)
        self.col_price = sql_column('testtable', 'price',
                                    dshape('3 * float64'),
                                    self.conn)

        test_data = np.array(data, dtype=[('i', np.int32),
                                          ('msg', '|S5'),
                                          ('price', np.float64)])
        self.np_i = test_data['i']
        self.np_msg = test_data['msg']
        self.np_price = test_data['price']
コード例 #2
0
    def setUp(self):
        self.conn = create_sqlite_table()

        self.table = sql_table(
            'testtable',
            ['i', 'msg', 'price'],
            [dshape('int32'), dshape('string'), dshape('float64')],
            self.conn)

        self.col_i = sql_column('testtable', 'i',
                                dshape('3, int32'),
                                self.conn)
        self.col_msg = sql_column('testtable', 'msg',
                                  dshape('3, string'),
                                  self.conn)
        self.col_price = sql_column('testtable', 'price',
                                    dshape('3, float64'),
                                    self.conn)

        test_data = np.array(data, dtype=[('i', np.int32),
                                          ('msg', '|S5'),
                                          ('price', np.float64)])
        self.np_i = test_data['i']
        self.np_msg = test_data['msg']
        self.np_price = test_data['price']
コード例 #3
0
ファイル: test_sql.py プロジェクト: AbhiAgarwal/blaze
    def setUp_DISABLED(self):
        self.conn = create_sqlite_table()

        self.col_i = from_table('select i from testtable',
                                dshape('a, int64'),
                                self.conn)
        self.col_msg = from_table('select msg from testtable',
                                  dshape('a, string'),
                                  self.conn)
        self.col_price = from_table('select price from testtable',
                                    dshape('a, float64'),
                                    self.conn)