org.jpos.ee.DB.createSchema()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(209)

本文整理了Java中org.jpos.ee.DB.createSchema()方法的一些代码示例,展示了DB.createSchema()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DB.createSchema()方法的具体详情如下:
包路径:org.jpos.ee.DB
类名称:DB
方法名:createSchema

DB.createSchema介绍

[英]Creates database schema
[中]创建数据库架构

代码示例

代码示例来源:origin: jpos/jPOS-EE

@Override
  public void exec(CLIContext cli, String[] args) throws Exception {
    String filename = "-";  // defaults to stdout     '
    String configModifier = null;
    boolean create = false;
    if (args.length > 1)
      filename = args[1];
    if (args.length > 2)
      create = "yes".equalsIgnoreCase(args[2]) || "true".equalsIgnoreCase(args[2]);
    if (args.length > 3)
      configModifier = args[3];

    try (DB db = new DB(configModifier)) {
      db.open();
      db.beginTransaction();
      db.createSchema(filename, create);
    }
  }
}

代码示例来源:origin: jpos/jPOS-EE

private void createSchema () throws HibernateException, DocumentException {
  DB db = new DB();
  db.open();
  db.beginTransaction();
  db.createSchema(null, true);
  db.commit();
  db.close();
}

代码示例来源:origin: jpos/jPOS-EE

@BeforeClass
public static void setUp() throws DocumentException {
  try (DB db = new DB()) {
    db.createSchema(null, true);
  }
}

代码示例来源:origin: jpos/jPOS-EE

@Before
public void setUp() throws Exception {
  db = new DB();
  db.createSchema("schema.sql", true);
  db.open();
}

相关文章