本文整理了Java中org.locationtech.geogig.model.Ref.simpleName
方法的一些代码示例,展示了Ref.simpleName
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ref.simpleName
方法的具体详情如下:
包路径:org.locationtech.geogig.model.Ref
类名称:Ref
方法名:simpleName
暂无
代码示例来源:origin: locationtech/geogig
private String doGet(final String refPath, final Connection cx) throws SQLException {
final int repo = config.getRepositoryId();
final String path = Ref.parentPath(refPath) + "/";
final String localName = Ref.simpleName(refPath);
final String refsTable = refsTableName;
final String sql = format(
"SELECT value FROM %s WHERE repository = ? AND path = ? AND name = ?", refsTable);
try (PreparedStatement st = cx.prepareStatement(log(sql, LOG, repo, path, localName))) {
st.setInt(1, repo);
st.setString(2, path);
st.setString(3, localName);
try (ResultSet rs = st.executeQuery()) {
if (rs.next()) {
return rs.getString(1);
}
return null;
}
}
}
代码示例来源:origin: org.locationtech.geogig/geogig-postgres
private String doGet(final String refPath, final Connection cx) throws SQLException {
final int repo = config.getRepositoryId();
final String path = Ref.parentPath(refPath) + "/";
final String localName = Ref.simpleName(refPath);
final String refsTable = refsTableName;
final String sql = format(
"SELECT value FROM %s WHERE repository = ? AND path = ? AND name = ?", refsTable);
try (PreparedStatement st = cx.prepareStatement(log(sql, LOG, repo, path, localName))) {
st.setInt(1, repo);
st.setString(2, path);
st.setString(3, localName);
try (ResultSet rs = st.executeQuery()) {
if (rs.next()) {
return rs.getString(1);
}
return null;
}
}
}
代码示例来源:origin: locationtech/geogig
final int repo = config.getRepositoryId();
final String path = Ref.parentPath(name) + "/";
final String localName = Ref.simpleName(name);
final String refsTable = refsTableName;
代码示例来源:origin: org.locationtech.geogig/geogig-postgres
final int repo = config.getRepositoryId();
final String path = Ref.parentPath(name) + "/";
final String localName = Ref.simpleName(name);
final String refsTable = refsTableName;
代码示例来源:origin: locationtech/geogig
final int repo = config.getRepositoryId();
final String path = Ref.parentPath(refName) + "/";
final String localName = Ref.simpleName(refName);
final String refsTable = refsTableName;
try (Connection cx = PGStorage.newConnection(dataSource)) {
代码示例来源:origin: org.locationtech.geogig/geogig-postgres
final int repo = config.getRepositoryId();
final String path = Ref.parentPath(refName) + "/";
final String localName = Ref.simpleName(refName);
final String refsTable = refsTableName;
try (Connection cx = PGStorage.newConnection(dataSource)) {
代码示例来源:origin: locationtech/geogig
@Test
public void testSimpleName() {
assertEquals("ref1", Ref.simpleName("refs/heads/ref1"));
assertEquals("HEAD", Ref.simpleName("HEAD"));
}
内容来源于网络,如有侵权,请联系作者删除!