SQLAlchemy用视图联接表

时间:2018-06-27 19:35:43

标签: python sqlalchemy

下表

var Enemy = function(game, x, y) {
    Phaser.Sprite.call(this, game, x,y,'Enemy');
    game.physics.enable(this, Phaser.Physics.ARCADE);
    this.enableBody = true;
    this.body.gravity.y = 400;
    var walk = this.animations.add('walk');
    this.animations.play('walk', 4, true);
    this.anchor.setTo(0.5, 0.5);
    this.scale.setTo(0.15);
    this.body.velocity.x = -60;
    this.health = 4;
    this.maxHealth = 4;
}
Enemy.prototype = Object.create(Phaser.Sprite.prototype);
Enemy.prototype.constructor = Enemy;

以及以下视图

class WeeknumTable(Base):
    __tablename__ = 'WeeknumTable'
    __table_args__ = {'schema': 'ww'}

    dt = Column(TIMESTAMP(), primary_key=True)
    weeknum = Column(String(10), index=True)
    fy = Column(Numeric(10, 0))

尝试在jupyter中导入此文件失败,原因是:无法验证参数'week_begin';找不到任何名为“ week”的SQLAlchemy方言   (k,dialect_name))

有人提示如何正确地连接视图和表格,以便我可以在过滤器中使用表格的字段吗?

0 个答案:

没有答案