// VertexIDsByString executes a string query and unmarshals the
// IDs for the user.
VertexIDsByString executes a string query and unmarshals the
IDs for the user.
// VertexIDsByString executes a string query and unmarshals the // IDs for the user .
func (v *vertexIDQueryManager) VertexIDsByString(q string) ([]string, error) {
	if !strings.HasSuffix(q, ".id()") {
		q += ".id()"
	}
	responses, err := v.executeStringQuery(q)
	if err != nil {
		v.logger.Error("invalid query",
			gremerror.NewQueryError("VertexIDs", q, err),
		)
		return nil, err
	}
	var rawIDs model.IDList
	for _, res := range responses {
		var idPart model.IDList
		err = jsonUnmarshal(res, &idPart)
		if err != nil {
			v.logger.Error("id unmarshal",
				gremerror.NewUnmarshalError("VertexIDs", res, err),
			)
			return nil, err
		}
		rawIDs.IDs = append(rawIDs.IDs, idPart.IDs...)
	}
	var ids []string
	for _, id := range rawIDs.IDs {
		ids = append(ids, strconv.Itoa(int(id.Value)))
	}
	return ids, nil
}
func ( v * vertexIDQueryManager ) VertexIDsByString ( q string ) ( [ ] string , error ) { if ! strings . HasSuffix ( q , " " ) { q += " " } responses , err := v . executeStringQuery ( q ) if err != nil { v . logger . Error ( " " , gremerror . NewQueryError ( " " , q , err ) , ) return nil , err } var rawIDs model . IDList for _ , res := range responses { var idPart model . IDList err = jsonUnmarshal ( res , & idPart ) if err != nil { v . logger . Error ( " " , gremerror . NewUnmarshalError ( " " , res , err ) , ) return nil , err } rawIDs . IDs = append ( rawIDs . IDs , idPart . IDs ... ) } var ids [ ] string for _ , id := range rawIDs . IDs { ids = append ( ids , strconv . Itoa ( int ( id . Value ) ) ) } return ids , nil }
VertexIDsByString executes a string query and unmarshals the
IDs for the user.
VertexIDsByString executes a string query and unmarshals the IDs for the user .
// retrieve all the vertices from the graph.