org.locationtech.geogig.model.Ref.simpleName()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(175)

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

Ref.simpleName介绍

暂无

代码示例

代码示例来源:origin: locationtech/geogig

  1. private String doGet(final String refPath, final Connection cx) throws SQLException {
  2. final int repo = config.getRepositoryId();
  3. final String path = Ref.parentPath(refPath) + "/";
  4. final String localName = Ref.simpleName(refPath);
  5. final String refsTable = refsTableName;
  6. final String sql = format(
  7. "SELECT value FROM %s WHERE repository = ? AND path = ? AND name = ?", refsTable);
  8. try (PreparedStatement st = cx.prepareStatement(log(sql, LOG, repo, path, localName))) {
  9. st.setInt(1, repo);
  10. st.setString(2, path);
  11. st.setString(3, localName);
  12. try (ResultSet rs = st.executeQuery()) {
  13. if (rs.next()) {
  14. return rs.getString(1);
  15. }
  16. return null;
  17. }
  18. }
  19. }

代码示例来源:origin: org.locationtech.geogig/geogig-postgres

  1. private String doGet(final String refPath, final Connection cx) throws SQLException {
  2. final int repo = config.getRepositoryId();
  3. final String path = Ref.parentPath(refPath) + "/";
  4. final String localName = Ref.simpleName(refPath);
  5. final String refsTable = refsTableName;
  6. final String sql = format(
  7. "SELECT value FROM %s WHERE repository = ? AND path = ? AND name = ?", refsTable);
  8. try (PreparedStatement st = cx.prepareStatement(log(sql, LOG, repo, path, localName))) {
  9. st.setInt(1, repo);
  10. st.setString(2, path);
  11. st.setString(3, localName);
  12. try (ResultSet rs = st.executeQuery()) {
  13. if (rs.next()) {
  14. return rs.getString(1);
  15. }
  16. return null;
  17. }
  18. }
  19. }

代码示例来源:origin: locationtech/geogig

  1. final int repo = config.getRepositoryId();
  2. final String path = Ref.parentPath(name) + "/";
  3. final String localName = Ref.simpleName(name);
  4. final String refsTable = refsTableName;

代码示例来源:origin: org.locationtech.geogig/geogig-postgres

  1. final int repo = config.getRepositoryId();
  2. final String path = Ref.parentPath(name) + "/";
  3. final String localName = Ref.simpleName(name);
  4. final String refsTable = refsTableName;

代码示例来源:origin: locationtech/geogig

  1. final int repo = config.getRepositoryId();
  2. final String path = Ref.parentPath(refName) + "/";
  3. final String localName = Ref.simpleName(refName);
  4. final String refsTable = refsTableName;
  5. try (Connection cx = PGStorage.newConnection(dataSource)) {

代码示例来源:origin: org.locationtech.geogig/geogig-postgres

  1. final int repo = config.getRepositoryId();
  2. final String path = Ref.parentPath(refName) + "/";
  3. final String localName = Ref.simpleName(refName);
  4. final String refsTable = refsTableName;
  5. try (Connection cx = PGStorage.newConnection(dataSource)) {

代码示例来源:origin: locationtech/geogig

  1. @Test
  2. public void testSimpleName() {
  3. assertEquals("ref1", Ref.simpleName("refs/heads/ref1"));
  4. assertEquals("HEAD", Ref.simpleName("HEAD"));
  5. }

相关文章