Updates sqlg_schema.V_graph's version to the new version and returns the old version.

@param sqlgGraph The graph.
@param version   The new version.
@return The old version.
166371
public static String updateGraph(SqlgGraph sqlgGraph, String version) {
        Connection conn = sqlgGraph.tx().getConnection();
        try {
            DatabaseMetaData metadata = conn.getMetaData();
            GraphTraversalSource traversalSource = sqlgGraph.topology();
            List<Vertex> graphVertices = traversalSource.V().hasLabel(SQLG_SCHEMA + "." + Topology.SQLG_SCHEMA_GRAPH).toList();
            Preconditions.checkState(graphVertices.size() == 1, "BUG: There can only ever be one graph vertex, found %s", graphVertices.size());
            Vertex graph = graphVertices.get(0);
            String oldVersion = graph.value(SQLG_SCHEMA_GRAPH_VERSION);
            if (!oldVersion.equals(version)) {
                graph.property(SQLG_SCHEMA_GRAPH_VERSION, version);
                graph.property(SQLG_SCHEMA_GRAPH_DB_VERSION, metadata.getDatabaseProductVersion());
                graph.property(UPDATED_ON, LocalDateTime.now());
            }
            return oldVersion;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
341011
public void setVersion(int version)
    {
        if (version < 0 || 255 < version)
        {
            throw new IllegalArgumentException("'version' is out of the valid range: " + version);
        }

        mVersion = version;

        getData()[VERSION_INDEX] = (byte)(version & 0xFF);
    }
198770
@Override
    public PropertyType sqlTypeToPropertyType(SqlgGraph sqlgGraph, String schema, String table, String column, int sqlType, String typeName, ListIterator<Triple<String, Integer, String>> metaDataIter) {
        switch (sqlType) {
            case Types.BIT:
                return PropertyType.BOOLEAN;
            case Types.SMALLINT:
                return PropertyType.SHORT;
            case Types.INTEGER:
                return PropertyType.INTEGER;
            case Types.BIGINT:
                return PropertyType.LONG;
            case Types.REAL:
                return PropertyType.FLOAT;
            case Types.DOUBLE:
                return PropertyType.DOUBLE;
            case Types.VARCHAR:
                return PropertyType.STRING;
            case Types.TIMESTAMP:
                return PropertyType.LOCALDATETIME;
            case Types.DATE:
                return PropertyType.LOCALDATE;
            case Types.TIME:
                return PropertyType.LOCALTIME;
            case Types.OTHER:
                //this is a f up as only JSON can be used for other.
                //means all the gis data types which are also OTHER are not supported
                switch (typeName) {
                    case "jsonb":
                        return PropertyType.JSON;
                    case "geometry":
                        return getPostGisGeometryType(sqlgGraph, schema, table, column);
                    case "geography":
                        return getPostGisGeographyType(sqlgGraph, schema, table, column);
                    default:
                        throw new RuntimeException("Other type not supported " + typeName);

                }
            case Types.BINARY:
                return BYTE_ARRAY;
            case Types.ARRAY:
                return sqlArrayTypeNameToPropertyType(typeName, sqlgGraph, schema, table, column, metaDataIter);
            default:
                throw new IllegalStateException("Unknown sqlType " + sqlType);
        }
    }
361171
def grab_rdflib_graph_version(g: Graph) -> str:
        '''  '''
        version = g.subject_objects( predicate = URIRef( OWL.versionIRI ) )
        version = [o for s, o in version]
        if len(version) != 1:
            print('versioning isn\'t correct')
        else:
            version = str(version[0])
            return version
1093733
public void setVersion(String version)
    {
        if (_state!=__MSG_EDITABLE)
            throw new IllegalStateException("Not EDITABLE");
        if (version.equalsIgnoreCase(__HTTP_1_1))
        {
            _dotVersion=1;
            _version=__HTTP_1_1;
        }
        else if (version.equalsIgnoreCase(__HTTP_1_0))
        {
            _dotVersion=0;
            _version=__HTTP_1_0;
        }
        else if (version.equalsIgnoreCase(__HTTP_0_9))
        {
            _dotVersion=-1;
            _version=__HTTP_0_9;
        }
        else
            throw new IllegalArgumentException("Unknown version");
    }
305031
public static void setVersion(JsonNode node, Long version) {
		obj(node).put(ID_VERSION, version);
	}
1106791
public boolean recordVersion(String version) {
    if (currentInfo.documentVersion(version)) {
      populated = true;
      return true;
    } else {
      return false;
    }
  }
292363
public static boolean gte(String version, String other) {
        E.checkArgumentNotNull(version, "The version to match is null");
        return new Version(version).compareTo(new Version(other)) >= 0;
    }
1211485
public static int setKeyValuesAsParameterUsingPropertyColumn(SqlgGraph sqlgGraph, int i, PreparedStatement preparedStatement, Map<String, Pair<PropertyType, Object>> properties) throws SQLException {
        i = setKeyValuesAsParameterUsingPropertyColumn(sqlgGraph, true, i, preparedStatement, properties.values());
        return i;
    }
115153
public void update(LGraphObject lGraphObj)
    {
        if (lGraphObj instanceof CoSEGraph)
        {
            return;
        }

        LNode lNode = (LNode)lGraphObj;

        this.glyph.getBbox().setX((float) lNode.getLeft());
        this.glyph.getBbox().setY((float) lNode.getTop());
        this.placeStateAndInfoGlyphs();
    }
1339321
public Versioned<V> update(V newValue, long newVersion) {
    Versioned<V> previousValue = value;
    value = new Versioned<>(newValue, newVersion);
    return previousValue;
  }
1301024
@Override
    public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
239928
public static void addSubPartition(SqlgGraph sqlgGraph, Partition partition) {
        AbstractLabel abstractLabel = partition.getAbstractLabel();
        addSubPartition(
                sqlgGraph,
                partition.getParentPartition().getParentPartition() != null,
                abstractLabel instanceof VertexLabel,
                abstractLabel.getSchema().getName(),
                abstractLabel.getName(),
                partition.getParentPartition().getName(),
                partition.getName(),
                partition.getPartitionType(),
                partition.getPartitionExpression(),
                partition.getFrom(),
                partition.getTo(),
                partition.getIn()
        );

    }
87212
@SuppressWarnings("unused") // called through reflection by RequestServer
  public FramesV3 column(int version, FramesV3 s) { // TODO: should return a Vec schema
    Frame frame = getFromDKV("key", s.frame_id.key());

    Vec vec = frame.vec(s.column);
    if (null == vec)
      throw new H2OColumnNotFoundArgumentException("column", s.frame_id.toString(), s.column);

    Vec[] vecs = { vec };
    String[] names = { s.column };
    Frame new_frame = new Frame(names, vecs);
    s.frames = new FrameV3[1];
    s.frames[0] = new FrameV3(new_frame);
    ((FrameV3)s.frames[0]).clearBinsField();
    return s;
  }
807587
def update_version_records(self):
        
        from .__init__ import __version__ as version
        with self.connection(commit=True) as connection:
            for vrec in self.get_version_records():
                if (vrec.rash_version == version and
                    vrec.schema_version == schema_version):
                    return  # no need to insert the new one!
            connection.execute(
                'INSERT INTO rash_info (rash_version, schema_version) '
                'VALUES (?, ?)',
                [version, schema_version])
906891
public static <M extends Model> Updater<M> withUpdater(String sql) {
        return withUpdater(DataSourceManager.getDefaultDataSourceName(), sql);
    }
485169
public static Artifact withVersion(Version v)
    {
        Artifact artifact = new Artifact();
        artifact.version = v;
        return artifact;
    }