[orientdb] Re: [Breaking News] CallidusCloud Acquires OrientDB, the Leading Multi-Model Database Technology

2017-09-22 Thread hartmut bischoff
This were my first thoughts, too.
We all remember the path mysql took, after oracle acquired it.

The development is not surprising though, if I recall correctly, private 
equity invested in the company about a year ago. 
Since the official announcement of  Callidus (there has been a REUTERS 
announcement), their share price went down. 
Sadly, OrientDB is now Property of one of those very high valued companies, 
which don't generate profits (P/E: -67, P/B: 6,7). This leads to the 
suspicion, that there are interested in short-term revenues only. 
This darkens the prospects for the community edition and sends a negative 
signal to customers of the enterprise edition.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Orientdb Installer script for Ubuntu and CentOS

2017-05-14 Thread hartmut bischoff
Your script installs the database itself. Prior to the usage of OrientDB 
you have to start die database-server manually. 

Personally,I prefer the conventional setup through a service, with proper 
settings of an orientdb-group and the ability for fine-tuning of 
access-rights as described in the docs 
(http://orientdb.com/docs/2.0/orientdb.wiki/Unix-Service.html).




On Saturday, May 13, 2017 at 7:40:11 PM UTC+2, limitun...@gmail.com wrote:
>
> I built a little automated installer script for orientDB that handles all 
> the initial configurations. 
> Hopefully this is helpful to someone new to Linux or just doesn't want to 
> do all the configurations themselves.
>
> https://gist.github.com/abstracted/70b44c8d4d8e0bc5a41f1a17de9fd63a
>
> *It may be better to run in on a system that does not already have java 
> installed, or you may need to change the java version after running this.*
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] HTTP Interface: result of query with exclude properties in select differs from those in studio

2017-04-19 Thread hartmut bischoff
Hi,

while trying to avoid loading of embedded-maps by fetching a record via 
http#get tried the batch command.

Firing 

*select expand( @this.exclude( 'portfolio_values','account_values')) from 
#140:0* 

in Studio
gives the expected result: 

>  

{

"result": [

{

"@type": "d",

"@rid": "#140:0",

"@version": 164,

"@class": "ib_account",

"connected": "true",

"account": "U797314",

"created_at": "2017-04-14T19:58:09.200 02:00",

"updated_at": "2017-04-19T17:45:03.772 02:00"

}

],

"notification": "Query executed in 0.03 sec. Returned 1 record(s)"

}


However, using the rest-api, the embedded records are fetched anyway:

>  

batch: select expand( @this.exclude( 'portfolio_values','account_values')) 
> from #140:0 

 => [{"@type"=>"d", "@rid"=>"#140:0", "@version"=>164, 
> "@class"=>"ib_account", 
> "*account_values"*=>{"ExcessLiquidity-S"=>{"@type"=>"d", 
> "@version"=>0, "EUR"=>"23245.90"}, ...



Bug or expected behavior?

 I am using the server 2.2.15

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Surprising Edge Behavior (no Object inherence)

2017-02-21 Thread hartmut bischoff
Hi altogether,

The ObjectModel of OrientDB surprises me once more.
Perhaps someone can clarify this

I got a bunch of Vertex-classes and two Edge-classes.


  5 ORD.create_vertex_class :stillhalter
  6 ORD.create_vertex_class :a
  7 ORD.create_classes [ :aktie, :option, :future, :waehrung ] { :a }
  8 ORD.create_edge_class :ist_componente
  9 ORD.create_class( :ist_underlying ){ :ist_componente }


which provides this hierarchy
- - E
 - ist_componente

   - ist_underlying
- - V
- a
   - aktie
   - future
   - option
   - waehrung
- stillhalter


If I allocate Objects and connect them via Edges
 14   b =  HC::Basiswert.create name: WordPicker.random.capitalize  
 15   a =  HC::Aktie.create  symbol: WordPicker.random.upcase[0..3] , 
basiswert: b
 16   o1 = HC::Option.create  expiry: Date.today , right: 'put', 
basiswert: b
 17   o2 = HC::Option.create  expiry: Date.today , right: 'call', 
basiswert: b
 18   s =  HC::Stillhalter.create basiswert: b
 19   [o1,o2].each{ |c| HC::IstComponente.create from: c, to: s }
 20   HC::IstUnderlying.create from: a, to: s


three Edges are allocated:
HC::IstComponente.count=> 3 


But
s=HC::Stillhalter.first
s.in_ist_componente.out.size => 2 


and an Inspection of the Database-Object reveals
=> #"d", 
"class"=>"stillhalter", "version"=>4, 
"fieldTypes"=>"in_ist_componente=g,basiswert=x,in_ist_underlying=g", 
"cluster"=>30, "record"=>2, 
"edges"=>{"in"=>["ist_componente", "ist_underlying"], "out"=>[]}}, @d=nil, 
@attributes={"in_ist_componente"=>["#64:4", "#61:5"], "basiswert"=>"#18:17", 
"in_ist_underlying"=>["#65:1"]



Thus .. Object-Inheritance is* not *maintained

Is this the intended behavior and why does the database break with the 
o-o-principles?



-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Graph Calendar Query

2017-02-12 Thread hartmut bischoff


Am Sonntag, 12. Februar 2017 21:22:39 UTC+1 schrieb Borov:
>
> I think I just got your idea. Misunderstood it at first. Sorry to confuse 
> you. 
>
> I see that your magic is happening due to the "grid_to" edge. As per your 
> documentation:
>
>> Besides the hierarchically TimeGraph »Jahr <-->Monat <--> Tag <--> 
>> Stunde« the Vertices are connected horizontally via »grid_to«-Edges. This 
>> enables an easy access to the neighbours.
>
>
> Can you please explain how do you internally connect these dates? Are you 
> simply taking each day and connect it to the next using the "grid_to" edge 
> at the time of building the entire year? Or, is there anything else 
> applied? And if this is how it works, which nodes do you connect a Day -> 
> Next Day or anything else?
>
> I tried to read your rubby logic, but realized that I'd need to first 
> learn ruby. Don't have that much time :)
>
>
>
Its quite simple, though I omitted any metaprogramming. 
1) Start with the given years  (an array or a range) and create a 
Year-Vertex.
2) Then connect via an GRID_OF-Edge to the  Neighbor-Year-Vertex, if 
present.
3) Create Month-Vertices in the same manner
4) repeat it with daily  and hourly vertices
5) Before closing the loop, create vertical edges

The Idea of the timegraph is to connect to an already present grid-element.
Thus the first step is to establish an empty grid. 
After this, you may attach anything you want to the grid and are able to 
fetch it with a customized logic. 

Hope you are now able, to move on.

Greetings
hartmut



TG::Jahr,Monat,Tag,Stunde are vertices,
TG::GRID_OF is the Edge-Class.
 

> (1) years.each do | the_year |
> year_vertex = TG::Jahr.create value: the_year
> (2) TG::GRID_OF.create( from: year_grid , to: year_vertex ) if 
> year_grid.present?
> year_grid =  year_vertex
> (3) month_vertices = ( 1 .. 12 ).map do | the_month |
>  month_vertex= TG::Monat.create value: the_month
>  TG::GRID_OF.create( from: month_grid , to: month_vertex ) if 
> month_grid.present?
>  month_grid =  month_vertex
>  last_month_day =  (Date.new( the_year, the_month+1, 1)-1).day rescue 31 
>  # rescue covers month > 12
> (4)  day_vertices = ( 1 .. last_month_day ).map do | the_day | 
>day_vertex = TG::Tag.create value: the_day  
>TG::GRID_OF.create( from: day_grid , to: day_vertex ) if 
> day_grid.present?
>day_grid =  day_vertex
>if kind_of_grid == 'hourly'
>  hour_vertices = (0 .. 23).map do |h| 
> hour_vertex =  Stunde.create( value: h)
> (5) TG::GRID_OF.create( from: hour_grid , to: hour_vertex ) if 
> hour_grid.present?
> hour_grid =  hour_vertex
> hour_vertex # return_value
>  end
> (5)  TG::TIME_OF.create from: day_vertex, to: hour_vertices
>end 
>day_vertex # return_value
>  end
> (5)  TG::DAY_OF.create from: month_vertex, to: day_vertices
>  month_vertex # return_value
> end
> (5) TG::MONTH_OF.create from: year_vertex, to: month_vertices
>   end
> end




 

>
> On Wednesday, February 8, 2017 at 11:31:11 PM UTC-8, hartmut bischoff 
> wrote:
>>
>> Hi,
>>
>> the time-graph in the ruby-gem follows the standard approach. Its 
>> documented on github.
>>
>> You are walking horizontally through the grid. Therefor you have to start 
>> at the day-class in order walk to a different day. On the year-level, the 
>> adjacent node is another year.
>>
>>
>> Am Donnerstag, 9. Februar 2017 07:39:50 UTC+1 schrieb Borov:
>>>
>>> Does your time-grid has the same node structure as in my diagram? I like 
>>> the idea of counting number of days in the range and do a traversal, 
>>> however, if I start the traversal from the top (Year) node it will get me 
>>> all months and days for the specified limit.
>>>
>>> How do I start from the specific day and go let say to the right 
>>> (ascending order) to get next days until the counted limit of days reached? 
>>> If I start from a specific day, I would have to traverse to its parent 
>>> (Month) and then to that parent (Year) in order to traverse days 
>>> horizontally, but it's the same as starting from the Year.
>>>
>>> For example, this traversal query get's me the 10 days, but how do I 
>>> start from a specific day and go to the right to get the next day, etc.?
>>>
>>> select from (
>>>   traverse out()
>>>   from #217:6  // Year node
>>>   maxdepth 2
>>>   strategy BREADTH_FIRST
>>> ) 
>>> where $depth >= 2
>>> limit 10
>>>
>>>
>>> Or am I missing something here? Or my graph (per diagram

[orientdb] ETL: jdbc-Query is not processed as expected

2017-02-09 Thread hartmut bischoff
Hi,

I am still processing my mysql-db.

There are two classes:  Asset and Portfolio that should be connected via a 
"hat_position" edge. 
On the edge, two fields should be created, which will eventually link to 
other vertices.

I am expecting, the ETL to refer the asset-class for a record with "id" and 
to create a link to portfolio 
What happens is: An asset-record is created, the id-field is taken from the 
assetposition_id output of the given query.

Question: How can I tell the etl-processor to use the output-fields of the 
query correctly? 

Thanks in advance
hartmut



The essential part of the json:


  "extractor" : {
  6 "jdbc": { "driver": "com.mysql.jdbc.Driver",
  (...)
 10   "query": "SELECT assets.id,  `focuspositions`.`portfolio_id`, 
*assetpositions.id 
as assetposition_id* FROM  assets INNER JOIN `assetpositions` ON 
`assets`.`id` = `assetpositions`.`ib_id` INNER JOIN `focuspositions` ON   
 `assetpositions`.`focusposition_id` = `focuspositions`.`id`" }
 11   },
 12   "transformers" : [ 
 13  { "vertex": { "class": "asset", "skipDuplicates": 
true} },
 14  { "edge": { "class": "hat_position", "direction" : 
"out", 
 15  "joinFieldName": "id",
 16  "edgeFields":{ "assetposition_id": 
"$(input.assetposition_id)",
 17"focusposition_id": 
"$(input.focusposition_id)"},
 18  "lookup": "portfolio.id", 
"unresolvedLinkAction": "WARNING" } }
 19   ],


The msql-query gives

+-+--+--+
> | id  | assetposition_id | portfolio_id |
> +-+--+--+
> |  59 | 2341 |2 |
> |  79 | 2345 |2 |
> |   4 | 2349 |2 |
> |  18 | 3361 |2 |
> | 114 | 3569 |2 |
> | 151 | 4511 |2 |
> |  30 | 5156 |2 |
> | 246 | 6944 |2 |
> | 271 | 7456 |2 |
> | 331 | 9190 |2 |
> +-+--+--+


id and portfolio_id refer to existing asset- and portfolio-records,

The log shows:

BEGIN ETL PROCESSOR
> Started execution with 1 worker threads
> Start extracting
> [1:vertex] DEBUG Transformer input: {id:2341,portfolio_id:2}
> [1:vertex] DEBUG Transformer output: v(asset)[#55:1277]
> [1:edge] DEBUG Transformer input: v(asset)[#55:1277]
> [1:edge] DEBUG joinCurrentValue=2341, lookupResult=null
> [1:edge] INFO edge: WARN Cannot resolve join for value '2341'


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Graph Calendar Query

2017-02-08 Thread hartmut bischoff
Hi,

the time-graph in the ruby-gem follows the standard approach. Its 
documented on github.

You are walking horizontally through the grid. Therefor you have to start 
at the day-class in order walk to a different day. On the year-level, the 
adjacent node is another year.


Am Donnerstag, 9. Februar 2017 07:39:50 UTC+1 schrieb Borov:
>
> Does your time-grid has the same node structure as in my diagram? I like 
> the idea of counting number of days in the range and do a traversal, 
> however, if I start the traversal from the top (Year) node it will get me 
> all months and days for the specified limit.
>
> How do I start from the specific day and go let say to the right 
> (ascending order) to get next days until the counted limit of days reached? 
> If I start from a specific day, I would have to traverse to its parent 
> (Month) and then to that parent (Year) in order to traverse days 
> horizontally, but it's the same as starting from the Year.
>
> For example, this traversal query get's me the 10 days, but how do I start 
> from a specific day and go to the right to get the next day, etc.?
>
> select from (
>   traverse out()
>   from #217:6  // Year node
>   maxdepth 2
>   strategy BREADTH_FIRST
> ) 
> where $depth >= 2
> limit 10
>
>
> Or am I missing something here? Or my graph (per diagrams) is not correct?
>
>
>
> On Wednesday, February 8, 2017 at 1:40:31 AM UTC-8, hartmut bischoff wrote:
>>
>>
>>
>> Am Mittwoch, 8. Februar 2017 09:55:43 UTC+1 schrieb hartmut bischoff:
>>>
>>> In the ruby-gem I realized it in a different way. 
>>> If you populated a time-grid correctly, you got exact one object per 
>>> time-frame (ie. one per day). The days are connected via nodes.
>>> Thus - if you count the time-frames (days) between start and end of your 
>>> time-range, you know the count of nodes to traverse.
>>>
>>> This is the ruby-method to get these elements:
>>>
>>> 85   def environment previous_items = 10, next_items = nil
>>> 86 next_items =  previous_items  if next_items.nil?  # default : 
>>> symmetric fetching
>>> 87 
>>> 88 my_query =  -> (count) { dir =  count <0 ? 'in' : 'out';   
>>> db.execute 
>>> {  "select from ( traverse   #{dir}(\"grid_of\") from #{rrid} while 
>>> $depth <= #{count.abs}) where $depth >=1 " } }  # don't fetch self
>>> 89 
>>> 90prev_result = previous_items.zero? ?  []  :  my_query[ 
>>> -previous_items 
>>> ]
>>> 91next_result = next_items.zero? ?  []  : my_query[ next_items ]
>>> 92 
>>> 93 prev_result.reverse  << self | next_result
>>> 94   end
>>>
>>>
>>> From the documentation:
>>>
>>>>  Get the nearest horizontal neighbors
>>>>  
>>>>  Takes one or two parameters. 
>>>>   
>>>>   (TG::TimeBase.instance).environment: count_of_previous_nodes, 
>>>> count_of_future_nodes
>>>>  
>>>>  Default: return the previous and next 10 items
>>>>   
>>>>   "22.4.1967".to_tg.environment.datum
>>>>=> ["12.4.1967", "13.4.1967", "14.4.1967", "15.4.1967", "16.4.1967", 
>>>> "17.4.1967", "18.4.1967", "19.4.1967", …"20.4.1967", "21.4.1967", 
>>>> "22.4.1967", "23.4.1967", "24.4.1967", "25.4.1967", "26.4.1967", 
>>>> "27.4.1967", "28.4. …1967", "29.4.1967", "30.4.1967", "1.5.1967", 
>>>> "2.5.1967"]
>>>>  
>>>
>>>
>>> I am sure you can easily adapt to java 
>>>
>>
>>
>> I just checked
>>
>> 2.4.0 :017 > t1 = Date.new 2015, 10, 15 # 10/15/2015 - 02/05/2017
>>  => Thu, 15 Oct 2015 
>> 2.4.0 :018 > t2 = Date.new 2017, 5, 2
>>  => Tue, 02 May 2017 
>> 2.4.0 :019 > date_range = t1.to_tg.environment(t2-t1)
>> (...)
>>
>>
>> 2.4.0 :020 > date_range.first## inspect ruby-object
>>  => #"d", "class"=>"tag", 
>> "version"=>4, "fieldTypes"=>"in_grid_of=g,out_grid_of=g,in_day_of=g", 
>> "cluster"=>26, "record"=>10431, "edges"=>{"in"=>["grid_of", "day_of"], 
>> "out"=>["grid_of"]}}, @d=nil, @attributes={"value"=>29, 
>> "in_grid_of"=>["#49:10802"], "out_grid_of"=>["#50:10802"], 
>> "in_day_of"=>["#42:10431"], "created_at"=>Wed, 08 Feb 2017 10:30:39 +0100}> 
>> 2.4.0 :021 > date_range.last
>>  => #"d", "class"=>"tag", 
>> "version"=>4, "fieldTypes"=>"in_grid_of=g,out_grid_of=g,in_day_of=g", 
>> "cluster"=>28, "record"=>10713, "edges"=>{"in"=>["grid_of", "day_of"], 
>> "out"=>["grid_of"]}}, @d=nil, @attributes={"value"=>2, 
>> "in_grid_of"=>["#52:11094"], "out_grid_of"=>["#49:11095"], 
>> "in_day_of"=>["#44:10713"], "created_at"=>Wed, 08 Feb 2017 10:30:40 +0100}> 
>> 2.4.0 :022 > date_range.last.datum   ## datum is a method of TG::Tag
>>  => "2.5.2017"
>>
>>
>> 2.4.0 :024 > date_range.size
>>  => 1131 
>>
>>
>>
>> seems it works as proposed
>>  
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Graph Calendar Query

2017-02-08 Thread hartmut bischoff


Am Mittwoch, 8. Februar 2017 09:55:43 UTC+1 schrieb hartmut bischoff:
>
> In the ruby-gem I realized it in a different way. 
> If you populated a time-grid correctly, you got exact one object per 
> time-frame (ie. one per day). The days are connected via nodes.
> Thus - if you count the time-frames (days) between start and end of your 
> time-range, you know the count of nodes to traverse.
>
> This is the ruby-method to get these elements:
>
> 85   def environment previous_items = 10, next_items = nil
> 86 next_items =  previous_items  if next_items.nil?  # default : 
> symmetric fetching
> 87 
> 88 my_query =  -> (count) { dir =  count <0 ? 'in' : 'out';   db.execute 
> {  "select from ( traverse   #{dir}(\"grid_of\") from #{rrid} while 
> $depth <= #{count.abs}) where $depth >=1 " } }  # don't fetch self
> 89 
> 90prev_result = previous_items.zero? ?  []  :  my_query[ -previous_items 
> ]
> 91next_result = next_items.zero? ?  []  : my_query[ next_items ]
> 92 
> 93 prev_result.reverse  << self | next_result
> 94   end
>
>
> From the documentation:
>
>>  Get the nearest horizontal neighbors
>>  
>>  Takes one or two parameters. 
>>   
>>   (TG::TimeBase.instance).environment: count_of_previous_nodes, 
>> count_of_future_nodes
>>  
>>  Default: return the previous and next 10 items
>>   
>>   "22.4.1967".to_tg.environment.datum
>>=> ["12.4.1967", "13.4.1967", "14.4.1967", "15.4.1967", "16.4.1967", 
>> "17.4.1967", "18.4.1967", "19.4.1967", …"20.4.1967", "21.4.1967", 
>> "22.4.1967", "23.4.1967", "24.4.1967", "25.4.1967", "26.4.1967", 
>> "27.4.1967", "28.4. …1967", "29.4.1967", "30.4.1967", "1.5.1967", 
>> "2.5.1967"]
>>  
>
>
> I am sure you can easily adapt to java 
>


I just checked

2.4.0 :017 > t1 = Date.new 2015, 10, 15 # 10/15/2015 - 02/05/2017
 => Thu, 15 Oct 2015 
2.4.0 :018 > t2 = Date.new 2017, 5, 2
 => Tue, 02 May 2017 
2.4.0 :019 > date_range = t1.to_tg.environment(t2-t1)
(...)


2.4.0 :020 > date_range.first## inspect ruby-object
 => #"d", "class"=>"tag", 
"version"=>4, "fieldTypes"=>"in_grid_of=g,out_grid_of=g,in_day_of=g", 
"cluster"=>26, "record"=>10431, "edges"=>{"in"=>["grid_of", "day_of"], 
"out"=>["grid_of"]}}, @d=nil, @attributes={"value"=>29, 
"in_grid_of"=>["#49:10802"], "out_grid_of"=>["#50:10802"], 
"in_day_of"=>["#42:10431"], "created_at"=>Wed, 08 Feb 2017 10:30:39 +0100}> 
2.4.0 :021 > date_range.last
 => #"d", "class"=>"tag", 
"version"=>4, "fieldTypes"=>"in_grid_of=g,out_grid_of=g,in_day_of=g", 
"cluster"=>28, "record"=>10713, "edges"=>{"in"=>["grid_of", "day_of"], 
"out"=>["grid_of"]}}, @d=nil, @attributes={"value"=>2, 
"in_grid_of"=>["#52:11094"], "out_grid_of"=>["#49:11095"], 
"in_day_of"=>["#44:10713"], "created_at"=>Wed, 08 Feb 2017 10:30:40 +0100}> 
2.4.0 :022 > date_range.last.datum   ## datum is a method of TG::Tag
 => "2.5.2017"


2.4.0 :024 > date_range.size
 => 1131 



seems it works as proposed
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Graph Calendar Query

2017-02-08 Thread hartmut bischoff
In the ruby-gem I realized it in a different way. 
If you populated a time-grid correctly, you got exact one object per 
time-frame (ie. one per day). The days are connected via nodes.
Thus - if you count the time-frames (days) between start and end of your 
time-range, you know the count of nodes to traverse.

This is the ruby-method to get these elements:

85   def environment previous_items = 10, next_items = nil
86 next_items =  previous_items  if next_items.nil?  # default : 
symmetric fetching
87 
88 my_query =  -> (count) { dir =  count <0 ? 'in' : 'out';   db.execute 
{  "select from ( traverse   #{dir}(\"grid_of\") from #{rrid} while $depth 
<= #{count.abs}) where $depth >=1 " } }  # don't fetch self
89 
90prev_result = previous_items.zero? ?  []  :  my_query[ -previous_items 
]
91next_result = next_items.zero? ?  []  : my_query[ next_items ]
92 
93 prev_result.reverse  << self | next_result
94   end


>From the documentation:

>  Get the nearest horizontal neighbors
>  
>  Takes one or two parameters. 
>   
>   (TG::TimeBase.instance).environment: count_of_previous_nodes, 
> count_of_future_nodes
>  
>  Default: return the previous and next 10 items
>   
>   "22.4.1967".to_tg.environment.datum
>=> ["12.4.1967", "13.4.1967", "14.4.1967", "15.4.1967", "16.4.1967", 
> "17.4.1967", "18.4.1967", "19.4.1967", …"20.4.1967", "21.4.1967", 
> "22.4.1967", "23.4.1967", "24.4.1967", "25.4.1967", "26.4.1967", 
> "27.4.1967", "28.4. …1967", "29.4.1967", "30.4.1967", "1.5.1967", 
> "2.5.1967"]
>  


I am sure you can easily adapt to java 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] How to interpret ETL messages

2017-02-06 Thread hartmut bischoff
Hi,

Working on import of mysql-data into orientdb.

It seems, that anything works as expected. But

> [11:merge] DEBUG Transformer input: 
>> {id:106,name:Pieper,vorname:Silke,titel:,anrede:Frau,plz:,ort:Zürich,strasse:,mailadress:sp@.com,telefon:0041
>>  
>> ,start:2014-03-28,ende:null,private_greeting:null,last_mail:4,musterdepot_id:59}
>
> [11:merge] DEBUG joinValue=106, lookupResult=null
>
> *[11:merge] DEBUG unresolved link!!! 0*
>
> [11:merge] DEBUG Transformer output: 
>> {id:106,name:Pieper,vorname:Silke,titel:,anrede:Frau,plz:,ort:Zürich,strasse:,mailadress:sp@.com,telefon:0041
>>  
>> ,start:2014-03-28,ende:null,private_greeting:null,last_mail:4,musterdepot_id:59}
>
> [11:vertex] DEBUG Transformer input: 
>> {id:106,name:Pieper,vorname:Silke,titel:,anrede:Frau,plz:,ort:Zürich,strasse:,mailadress:sp@.com,telefon:0041
>>  
>> ,start:2014-03-28,ende:null,private_greeting:null,last_mail:4,musterdepot_id:59}
>
> [11:vertex] DEBUG Transformer output: v(musterdepot)[#30:1]
>
> [11:edge] DEBUG Transformer input: v(musterdepot)[#30:1]
>
> [11:edge] DEBUG joinCurrentValue=59, lookupResult=[#27:7]
>
> [11:edge] DEBUG created new edge=e[#34:1][#27:7-referenziert->#30:1]
>
> [11:edge] DEBUG Transformer output: v(musterdepot)[#30:1
>
> What is the output trying to tell me?

If the message can be silently ignored, why is it displayed? 


 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Array Behavior

2017-02-02 Thread hartmut bischoff
DONE

https://github.com/orientechnologies/orientdb/issues/7141


On Monday, January 30, 2017 at 9:42:53 AM UTC+1, Luigi Dell'Aquila wrote:
>
> Hi Hartmut,
>
> It seems to be a bug, could you please file an issue about this?
>
> Thanks
>
> Luigi
>
>
> 2017-01-28 10:08 GMT+01:00 hartmut bischoff <topo...@gmail.com 
> >:
>
>> I observed a strange behavior of simple Arrays
>>
>> On a schemaless db, when I perform an update like
>>
>> UPDATE #18:4 set abc = [34,54,'gh']
>>
>> the array is created correctly
>>
>> But if I do 
>>
>> UPDATE #18:4 set abc = [34,54,'gh',#19:4]
>>
>> only a the link is left in the array
>>
>>
>> select from #18:4
>> {   "result": [{   "@type": "d",  "@rid": "#18:4",  
>> "@version": 10,   "@class": "test_model", "abc": [
>> "#19:4" ], ... }
>>
>>
>> same is happening if I do
>>
>>
>> UPDATE #18:4 set abc = [34,54,'gh']
>> UPDATE #18:4 ADD abc = #19:4
>>
>> In both cases, all array-fields other then links are erased without any 
>> warning or raising an error.
>>
>> Is this the desired behavior or a bug?
>>
>> hartmut
>>
>>
>> p.s Observation made using v. 2.2.5 
>>
>> -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to orient-databa...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] [Announce]: ActiveOrient 0.6

2017-02-02 Thread hartmut bischoff

Hi folks,
today I released a new Version of ActiveOrient, Access OrientDB using ruby 
aka ActiveRecord

https://github.com/topofocus/active-orient

The gem is now rails 5 compatible 

Luigi, can you please update the description in the language-driver section 
accordingly.

Geetings from Stuttgart

>
> hartmut
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Graph Calendar Query

2017-01-28 Thread hartmut bischoff


Perhaps its worth, to look at 
https://github.com/topofocus/orientdb_time_graph
I included  some sample-Queries 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Array Behavior

2017-01-28 Thread hartmut bischoff
I observed a strange behavior of simple Arrays

On a schemaless db, when I perform an update like

UPDATE #18:4 set abc = [34,54,'gh']

the array is created correctly

But if I do 

UPDATE #18:4 set abc = [34,54,'gh',#19:4]

only a the link is left in the array


select from #18:4
{   "result": [{   "@type": "d",  "@rid": "#18:4",  
"@version": 10,   "@class": "test_model", "abc": [
"#19:4" ], ... }


same is happening if I do


UPDATE #18:4 set abc = [34,54,'gh']
UPDATE #18:4 ADD abc = #19:4

In both cases, all array-fields other then links are erased without any 
warning or raising an error.

Is this the desired behavior or a bug?

hartmut


p.s Observation made using v. 2.2.5 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Update with sub selec query not working

2017-01-26 Thread hartmut bischoff

As I mentioned before, the result form select should always be an array.

This works accordingly:


INSERT into B set aID = (select id from (select from A where name='Test 
1')), text = "tesing me"

INSERT into B set aID = (select id from (select from #29:0)), text = 
"tesing me"

{
"result": [
{
"@type": "d",
"@rid": "#34:0",
"@version": 1,
"@class": "b",
"aID": [
1
],
"text": "tesing me"
}
],
"notification": "Query executed in 0.029 sec. Returned 1 record(s)"
}

I don't see a reason for a fix

On Wednesday, January 25, 2017 at 6:49:22 PM UTC+1, Borov wrote:
>
> Hi Luigi,
>
> I've created an issue #7123 
> <https://github.com/orientechnologies/orientdb/issues/7123>.
>
> Thanks
>
>
> On Tuesday, January 24, 2017 at 12:34:47 AM UTC-8, Luigi Dell'Aquila wrote:
>>
>> Hi,
>>
>> Yes please, if you could submit a bug (maybe with a simple script to 
>> reproduce the problem) it would help a lot
>>
>> Thanks
>>
>> Luigi
>>
>>
>> 2017-01-23 20:57 GMT+01:00 Borov <boro...@gmail.com>:
>>
>>> Hi Luigi,
>>>
>>> I just downloaded 2.2.15 to test this fix, but it still fails. Did your 
>>> fix made into 2.2.15 or shall I submit a bug?
>>>
>>> Thanks,
>>>
>>>
>>> On Tuesday, January 3, 2017 at 1:23:18 PM UTC-8, Borov wrote:
>>>>
>>>> Thanks for fixing it Luigi. 
>>>>
>>>>
>>>> On Monday, January 2, 2017 at 2:19:56 AM UTC-8, Luigi Dell'Aquila wrote:
>>>>>
>>>>> Hi guys,
>>>>>
>>>>> I just pushed a fix on branch 2.2.x 
>>>>>
>>>>> Thanks
>>>>>
>>>>> Luigi
>>>>>
>>>>>
>>>>> 2017-01-02 10:19 GMT+01:00 Luigi Dell'Aquila <luigi.de...@gmail.com>:
>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> You're right, the old executor supported it but the parser does not 
>>>>>> correctly parse it. I think I can easily support it, I'm checking it 
>>>>>> now. 
>>>>>> I'll keep you posted
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Luigi
>>>>>>
>>>>>>
>>>>>> 2016-12-31 17:48 GMT+01:00 hartmut bischoff <topo...@gmail.com>:
>>>>>>
>>>>>>>
>>>>>>> select ... where  gives an array, thus you simply have to address 
>>>>>>> the first item of the resultset
>>>>>>>
>>>>>>> i.e.  (untested)
>>>>>>> update #69:0 set meta.ownerId = $a.first  let $a= ( select id from 
>>>>>>> Account where @rid = #25:1 )
>>>>>>>
>>>>>>> -- 
>>>>>>>
>>>>>>> --- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "OrientDB" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to orient-databa...@googlegroups.com.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>> -- 
>>>
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to orient-databa...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Update with sub selec query not working

2016-12-31 Thread hartmut bischoff

select ... where  gives an array, thus you simply have to address the first 
item of the resultset

i.e.  (untested)
update #69:0 set meta.ownerId = $a.first  let $a= ( select id from Account 
where @rid = #25:1 )

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Namespacing for classes

2016-10-19 Thread hartmut bischoff
Hi,

in ActiveOrient, namespace support is realised on the ruby-side.
I.e. class-properties are defined either in the included gem's (like 
time-series) and/or in  the model-directory of the main application.

The lack of support on the java-end is a disadvantage, thus you  have to 
pick unique class-names. 


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] readable query is slow, fast query is un-readable

2016-09-19 Thread hartmut bischoff
Hi,  
in a previous mail, I attached a test-database with 

   - a timegraph 'jahr', 'monat' 'tag' 
   - a class 'bar'
   - edges with a property "asset" pointing to a record in a class 
   'contract'

There is also some inherence : ohcl<- price <- midpoint, volatility  and so 
on.

The Idea is, to define ranges at the timegraph and investigate the 
properties of the connected vertices, which belong to some asset.

This is the basic graph

tag -- (out) -- ohlc -- (in) -- bar

In order to query for all data present for a contract (#58:2), 
My first attempt was a  simple direct query:

select expand(out('ohlc')) from tag where out('ohlc).asset = #58:2


unfortunately, an empty set was returned

However, changing to 

select expand(out('ohlc')) from tag where out_midpoint.asset = #58:2


leads to the correct result. 

*Question: Is it possible to query inherent edges in this way?*


I was very surprised: The query took 0.5 sec, with just a few records in 
the database.

The query took so long, because the hole time-graph was examined, as 
explain revealed: documentReads: 55152 

After some thinking, I came out with 

select expand(out('ohlc')) from (select expand(out) from ohlc where asset= 
> #58:2 )


which fetches an identical result but is almost un-readable.  It is 10 
times faster: 0,068 sec. 

My question is: I*s it possible to write a human readable query without 
loosing to much performance? *I couldn't figure out a solution using the 
match statement, so maybe there is another solution.  

A last thing: How can I determine the effects of scaling in terms of the 
execution time of the query. I wonder, whether my query will be as slow, if 
some hundred contracts and some million bars are present in the database, 
whereas the first attempt has probably a static execution time.

Thanks in advance

hartmut

10255010010005000

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: simple query ist mysterious

2016-09-19 Thread hartmut bischoff
I'm using 2.2.7






On Monday, September 19, 2016 at 8:42:38 AM UTC+2, Oleksandr Gubchenko 
wrote:
>
> I've tried it on the latest 2.2.10 and both studio and rest (using 
> postman) give me the right result:
>
> {"result":[{"@type":"d","@rid":"#21:0","@version":1,"@class":"contract",
> "strike":30,"@fieldTypes":"strike=c"}]}
>
>
>>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] simple query ist mysterious

2016-09-19 Thread hartmut bischoff
Hi,

I was very surprised, that a simple query " select from something where a = 
b " could be a subject.

but
2.3.1 :001 > DB.execute{ "select from contract where strike = 30" }
 => [] 
2.3.1 :002 > DB.execute{ "select from contract where strike between 30 and 
30" }
 => [#"d", 
"class"=>"option", "version"=>1, "fieldTypes"=>"expiry=t,strike=c", 
"cluster"=>25, "record"=>25},  @attributes={ (...) "strike"=>30.0, (...) ] 
2.3.1 :003 > 

 
(rest-api)

A verification in studio was successful. 

The property "strike" is defined as decimal. 

Why is the simple "where strike =  30" or "where strike = 30.0" returning 
an empty result,
whereas "where strike between 30 and 30" returns the correct record?



hartmut






-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] [Announce]: ActiveOrient 0.5

2016-09-01 Thread hartmut bischoff
Hi folks,

today I released a new Version of ActiveOrient, Access OrientDB using ruby 
aka ActiveRecord

https://github.com/topofocus/active-orient

There is a small "time-graph" example which describes some features:

https://github.com/topofocus/active-orient/tree/master/examples/time_graph


Summergreetings from Stuttgart

hartmut

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] documentation inconstistency

2016-08-26 Thread hartmut bischoff
http://orientdb.com/docs/master/SQL-Delete-Edge.html

Deleting Edges from a Sub-query

Consider a situation where you have an edge with a Record ID of #11:0 that 
you want to delete. In attempting to do so, you run the following query:

orientdb> DELETE EDGE FROM (SELECT FROM #11:0)
(...)


Syntax

DELETE EDGE 
( 
  |
  [ (, )*] 
(...)


If I want to delete the Edge #11:0, I run 
DELETE EDGE #11:0


The documentation tells me to use
DELETE EDGE E WHERE @rid IN (SELECT FROM #11:0) 
instead


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Feature or Mistake: quoted classname breaks the db

2016-08-22 Thread hartmut bischoff
Thanks,

works in studio,  I have to implement this feature in activeOrient.

On Monday, August 22, 2016 at 6:49:26 PM UTC+2, Ivan Mainetti wrote:
>
> Hi,
> try with backtick:
>
> drop class `'stunde'`
>
> I've tried it on 2.2.7 an it works.
>
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Feature or Mistake: quoted classname breaks the db

2016-08-22 Thread hartmut bischoff
Due to some mishandling of strings, my application generated a class 
'stunde' (with quotes). 
Although the class is created and properly displayed using database#get 
through REST,
its hard to access it.

Worst, in Studio or via command-line its not possible to alter or delete it.

ORD.database_classes
>
>  => ["'stunde'", "E", "V", "day_of", "monat", "stunde", "tag", 
>> "time_base", "time_of"] 
>
>  

>  ORD.execute{ 'delete class "'stunde'" ' }
> SyntaxError: (irb):10: syntax error, unexpected tIDENTIFIER, expecting '}'
> ORD.execute{ 'delete class "'stunde'" ' }
>

 

ORD.execute{ 'alter class 'stunde' name StundeNeu ' }

SyntaxError: (irb):4: syntax error, unexpected tIDENTIFIER, expecting '}'

ORD.execute{ 'alter class 'stunde' name StundeNeu ' }


I attached the compromised test-database


If its possible to create such a class, a path to alter or delete it, 
should be provided, too.
But maybe I did not find it in the documentation.

Some hints?

Greetings from Stuttgart

 hartmut

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


time_production.gz
Description: Binary data


[orientdb] Re: I cannot run OrientDB as a service on Ubuntu 16.04 (systemd stops immediately after start)

2016-08-15 Thread hartmut bischoff
Thanks for reporting this.
I wanted to update my system, but will postpone this until this matter is 
solved.
You saved me much frustration, I guess


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Uniqe Index in SubClasses

2016-07-28 Thread hartmut bischoff
Thanks for the quick response.

Unfortunately, this leads to other Questions, probably due to a lac of 
skills on my side
  
1. How does this affect queries based on the superclass?
The Match-Query presented in another topic is already slow. 

2. Do I have to define two indexes, one on the superclass (non-unique) and 
in addition one on every Subclass (unique). 

3. Can I use the same name for the indexes on the subclass-level and are 
they  combined if a query on the superclass is performed. in case there is 
no index defined for the superclass?



-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Uniqe Index in SubClasses

2016-07-27 Thread hartmut bischoff
As mentioned before, my test-suite-Vertices have the following structure:
- V
  - - - Contract
- - ContractDetail
- - Sector
  - - Category
- Industry
- Subcategory

Contracts got an unique Index "Con_id" and Sector "name".


names are unique on class-level only.
My "quick" solution was to extend the index on Sector to "name, k", 
where k is a shortcut of the class.

 93 orientdb.create_properties( :Sector, name: {type: :string}, k: 
{type: :string})
 94 orientdb.create_index( :Sector,  name: 'sectorindex', on: 
[:name, :k], type: :unique  )




Then I can use the atomic upsert  (with ruby code:)

136 sub_cat_record = ActiveOrient::Model::Subcategory.upsert( 
set: { :k => 'S' },
137  where: { :name => 
contract.contract_detail.subcategory }) do | new_sub_cat |
138 category_record = 
 ActiveOrient::Model::Category.upsert( set: { :k => 'C' },
139 where: { :name => 
contract.contract_detail.category }) do | new_category |
140 industry_record = 
ActiveOrient::Model::Industry.upsert( set: { :k => 'I' },
141   where: { :name => 
contract.contract_detail.industry }) do | new_industry |


Obviously this is a sloppy workaround.

Is there a way to specify an Index which is unique on class-level ? 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] OrientDB2.2 Match Statement, API

2016-07-27 Thread hartmut bischoff
Short Addition:

Performed the query in Studio:


MATCH {class: Industry, as: Industries} <-- {} <-- {} <-- { as: asset } 
> RETURN Industries, asset
> 
> 1
> {
> 2
> "result": [
> 3
> {
> 4
> "@type": "d",
> 5
> "@version": 0,
> 6
> "Industries": "#21:3",
> 7
> "asset": "#44:202",
> 8
> "@fieldTypes": "Industries=x,asset=x"
> 9
> },
> 10
> {
> 11
> "@type": "d",
> 12
> "@version": 0,
> 13
> "Industries": "#23:1",
> 14
> "asset": "#41:5",
> 15
> "@fieldTypes": "Industries=x,asset=x"
> 16
> },
> 17
> {
> 18
> "@type": "d",
> 19
> "@version": 0,
> 20
> "Industries": "#23:1",
> 21
> "asset": "#41:28",
> 22
> "@fieldTypes": "Industries=x,asset=x"
> 23
> },
> 24
> {
> Query executed in *424.356 sec*. Returned 555 record(s). Limit: 2000 
> (CHANGE IT)
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] OrientDB2.2 Match Statement, API

2016-07-27 Thread hartmut bischoff









Hi,
just downloaded 2.2.5 community edition and tried to query the database 
with match.

this is my database-structure  (as posted in DEV.gz)
- - E
- scanner_result
- sector_classification
- - V
  - -  Contract
   - Currency
   - Future
   - Option
   - Stock
  - ContractDetail
  - - Sector
   - Category
   - Industry
   - Subcategory

With 2.2.5 the Match-query 

> MATCH {class: Industry, as: Industries} <-- {} <-- { as: Subcategories } 
>  RETURN Industries, Subcategories
>
executes using the REST Interface as well as the Java-Api (with JRuby).

Surprisingly, a slight modification

MATCH {class: Industry, as: Industries} <-- {} <-- {} <-- { as: asset } 
>  RETURN Industries, asset

returns a Timeout-Error on the REST-Interface
but gives a result using the java-api. 

The result-set is about 550 datasets. It took several minutes to perform 
the query. 
Now I am asking myself, where to start the optimizing-process. 

There are  indexes  sector (uniq, fields name, k)  and  contract (uniq, 
con_id). There is no Index any Edge-Class.

A "view" to the Database – the query aims to fetch all Stocks related to an 
Industry:



Any Suggestions?
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] OrientDB2.2 Match Statement, API

2016-06-30 Thread Hartmut Bischoff
Just saw your message ... thanks very much. Looking forward.


2016-06-30 12:48 GMT+02:00 Hartmut Bischoff <topofo...@gmail.com>:

>
>
> Am 30.06.2016 um 09:29 schrieb Luigi Dell'Aquila:
>
> Hi Hartmut
>
> I see a backslash before a } in your request
>
>   ret= DB.execute { 'MATCH {class: Industry, as: Industries\} <-- {} <-- {
> as: Subcategories }  RETURN Industries, Subcategories' }
>
> Could that be the problem?
>
> About the NPE, I'm checking it now
>
> Thanks
>
> Luigi
>
>
>
> thanks.
>
> The backslash is left out of a "experiment" trying to escape special
> characters.
> I tried  ... replacing ' { '  by " \{ ",
> ... quoting the classes " MATCH{ class: 'Industry'  ... "
> and even "MATCH {class `Industry`...
>
> but did not succeed.
> I replaced the "<--" notation with "inE()", but nothing changed.
>
> You can check out the jruby-branch of active-orient to reproduce the error.
>
> bin/orientdb-console
> and then ORD.execute or DB.execute
> which queries through different api's in a jruby-environmet.
>



-- 
finanz coaching
Dr. Hartmut Bischoff
Stuttgart
( http://ficoach.de)

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] OrientDB2.2 Match Statement, API

2016-06-30 Thread Hartmut Bischoff
Am 30.06.2016 um 09:29 schrieb Luigi Dell'Aquila:

Hi Hartmut

I see a backslash before a } in your request

  ret= DB.execute { 'MATCH {class: Industry, as: Industries\} <-- {} <-- {
as: Subcategories }  RETURN Industries, Subcategories' }

Could that be the problem?

About the NPE, I'm checking it now

Thanks

Luigi



thanks.

The backslash is left out of a "experiment" trying to escape special
characters.
I tried  ... replacing ' { '  by " \{ ",
... quoting the classes " MATCH{ class: 'Industry'  ... "
and even "MATCH {class `Industry`...

but did not succeed.
I replaced the "<--" notation with "inE()", but nothing changed.

You can check out the jruby-branch of active-orient to reproduce the error.

bin/orientdb-console
and then ORD.execute or DB.execute
which queries through different api's in a jruby-environmet.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] OrientDB2.2 Match Statement, API

2016-06-29 Thread hartmut bischoff
Hi,
I am trying to implement the match-query-syntax either in the java-api 
(through jruby) or via REST.

This works in Studio:

> MATCH {class: Industry, as: Industries} <-- {} <-- { as: Subcategories } 
> RETURN Industries, Subcategories
>

 

"result": [

{

"@type": "d",

"@version": 0,

"Industries": "#21:3",

"Subcategories": "#28:46",

"@fieldTypes": "Industries=x,Subcategories=x"

},

{

"@type": "d",

"@version": 0,

"Industries": "#23:1",

"Subcategories": "#26:2",

"@fieldTypes": "Industries=x,Subcategories=x"

},  (...)


However "explain" gives a  java.lang.NullPointerException.#

Now my problem.

When submitting the query via REST(batch) it is parsed via json 
and ends up with a Timeout-Error (im my case 

# 
>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/request.rb:427:in
>>  
>> `rescue in transmit 
>
> # 
>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/request.rb:350:in
>>  
>> `transmit'
>
>  # 
>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in
>>  
>> `execute'
>
>  # 
>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in
>>  
>> `execute'
>
>  # 
>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/resource.rb:67:in
>>  
>> `post'
>
>  # /home/topo/activeorient/lib/rest_operations.rb:63:in `execute'
>
>  # /home/topo/activeorient/lib/model_class.rb:353:in `query_database'
>
>  # /home/topo/activeorient/lib/model_class.rb:316:in `match'
>
>  # ./spec/usecase/contracts_spec.rb:87:in `block (3 levels) in > (required)>'
>
>  # --
>
>  # --- Caused by: ---
>
>  # Net::ReadTimeout:
>
>  #   Net::ReadTimeout
>
>  #   
>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/request.rb:270:in
>>  
>> `net_http_do_requestt
>
>
when transmitting via the java api using the command method,
jruby-head :012 >   ret= DB.execute { 'MATCH {class: Industry, as: 
Industries\} <-- {} <-- { as: Subcategories }  RETURN Industries, 
Subcategories' }
Java::ComOrientechnologiesOrientEnterpriseChannelBinary::OResponseProcessingException:
 
Exception during response processing
from 
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.throwSerializedException(com/orientechnologies/orient/client/binary/OChannelBinaryAsynchClient.java:447)
from 
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(com/orientechnologies/orient/client/binary/OChannelBinaryAsynchClient.java:382)
from 
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(com/orientechnologies/orient/client/binary/OChannelBinaryAsynchClient.java:264)
from 
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(com/orientechnologies/orient/client/binary/OChannelBinaryAsynchClient.java:152)
from 
com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(com/orientechnologies/orient/client/remote/OStorageRemote.java:2117)
from 
com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(com/orientechnologies/orient/client/remote/OStorageRemote.java:2112)
from 
com.orientechnologies.orient.client.remote.OStorageRemote$19.execute(com/orientechnologies/orient/client/remote/OStorageRemote.java:1154)
from 
com.orientechnologies.orient.client.remote.OStorageRemote.networkOperation(com/orientechnologies/orient/client/remote/OStorageRemote.java:168)
from 
com.orientechnologies.orient.client.remote.OStorageRemote.command(com/orientechnologies/orient/client/remote/OStorageRemote.java:1130)
from 
com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(com/orientechnologies/orient/core/command/OCommandRequestTextAbstract.java:69)
from java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
from 
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:423)
from 
org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:290)
from RUBY.run_command(/home/topo/orientdb-jruby/lib/orientdb/database.rb:6)
from RUBY.block in execute(/home/topo/activeorient/lib/java-api.rb:306)

As there is a SerializedException-Error,  I suspect, this is simply a 
matter of escaping some characters.
How is this done? 

Thanks 

hartmut
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Order BY @RID DESC stops working in 2.2

2016-06-09 Thread hartmut bischoff


On Thursday, June 9, 2016 at 10:59:23 AM UTC+2, Luigi Dell'Aquila wrote:
>
> Hi,
>
> could it depend on multiple clusters per class? How many clusters does 
> your "industry" class have?
>
> I tried in Studio the query
>
> SELECT FROM OUser ORDER BY @rid DESC
>
> and it worked fine...
>
>
Just tried it again:


SELECT FROM the_dataset ORDER BY @rid DESC limit 1

gives the same result then

SELECT FROM the_dataset ORDER BY @rid  limit 1

and

SELECT FROM the_dataset ORDER BY @rid ASC limit 1




Its a very small test-database  ...


>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Time Series Usecase

2015-11-26 Thread hartmut bischoff
Hi alltogether,

I really like the concept of storing unsorted data to a time-series 
calendar and perform lazy (or fuzzy) analytics afterwards
Second, I want to realize this with the Ruby Object Mapping Tool 
 ActiveOrient.
So I followed the usecase-instructions in the maual 
 (http://orientdb.com/docs/2.1/Time-series-use-case.html)  using the 2.1.5 
release of OrientDB.

Some minor changes were necessary, first I was not able to use Linkmaps, 
because this Version completely rejected any attempt to insert data into 
the linkmap-field. After changing to LinkList anything works.

This is the class-tree
V -->  "Exchange", ["ExShare", "ExVol"]
V -->  Day ,"Month", "Year" 
All classes are Vertices, the exchange-based classes contain data to store 
in the calendar.

The content of a Month-record:
 => #"d", "class"=>"Month", "version"=>33, "fieldTypes"=>
"day=z", "cluster"=>13, "record"=>23}, 
@attributes={"label"=>10, 
 "day"=>["#14:736", "#14:737", "#14:738", "#14:739", "#14:740", 
"#14:741", "#14:742", "#14:743", "#14:744", "#14:745", "#14:746", "#14:747", 
"#14:748", "#14:749", "#14:750", "#14:751", "#14:752", "#14:753", "#14:754", 
"#14:755", "#14:756", "#14:757", "#14:758", "#14:759", "#14:760", "#14:761", 
"#14:762", "#14:763", "#14:764", "#14:765", "#14:766", "#14:767"], 
 "created_at"=>2015-11-26 06:40:17 +0100, "updated_at"=>2015-11-
26 06:40:17 +0100}> 

Properties of Year:  month: type linklist
Properties of Month: day: type linklist
Properties of Day: ad_share, ad_vol each type linklist


Thanks to the Usecase-documentation, I even managed to assign data-items to 
the calendar.

Now the tricky part: retrieving of the data.

Firstly: The documentation uses "SELECT union()" to aggregate the data.
This should be changed to "SELECT unionall( "  by somebody with write 
access to the documentation.

The DataRecords are stored in ExShare and ExVol, both equipped with an 
Index: date+exchange: unique

The Query 
select expand( shares ) from  ( 
   select unionall(ad_share) AS shares from  ( 
  traverse day from  ( select expand( month[10] ) from year 
where label = 2015  )))   order by New52WeekHigh


reveals
+---+---+-++-+-+-+---++--+-+-
#   |@RID   |@CLASS 
|Total|exchange|Advancing|Declining|Unchanged|New52WeekLo|New52WeekHig|date 
 |created_at   |updated_at   
+---+---+-++-+-+-+---++--+-+-
0   |#10:605|ExShare|375  |amex|174  |181  |20   |14   
  |0   |2015-10-01 
00:0...|2015-11-26T17:08:46.12...|2015-11-26T17:08:46.12...
1   |#10:605|ExShare|375  |amex|174  |181  |20   |14   
  |0   |2015-10-01 
00:0...|2015-11-26T17:08:46.12...|2015-11-26T17:08:46.12...
2   |#10:605|ExShare|375  |amex|174  |181  |20   |14   
  |0   |2015-10-01 
00:0...|2015-11-26T17:08:46.12...|2015-11-26T17:08:46.12...
3   |#10:605|ExShare|375  |amex|174  |181  |20   |14   
  |0   |2015-10-01 
00:0...|2015-11-26T17:08:46.12...|2015-11-26T17:08:46.12...
4   |#10:605|ExShare|375  |amex|174  |181  |20   |14   
  |0   |2015-10-01 
00:0...|2015-11-26T17:08:46.12...|2015-11-26T17:08:46.12...
5   |#10:605|ExShare|375  |amex|174  |181  |20   |14   
  |0   |2015-10-01 
00:0...|2015-11-26T17:08:46.12...|2015-11-26T17:08:46.12...
6   |#10:635|ExShare|378  |amex|244  |116  |18   |4 
 |0   |2015-10-15 
00:0...|2015-11-26T17:09:00.81...|2015-11-26T17:09:00.81...
7   |#10:635|ExShare|378  |amex|244  |116  |18   |4 
 |0   |2015-10-15 
00:0...|2015-11-26T17:09:00.81...|2015-11-26T17:09:00.81...
8   |#10:635|ExShare|378  |amex|244  |116  |18   |4 
 |0   |2015-10-15 
00:0...|2015-11-26T17:09:00.81...|2015-11-26T17:09:00.81...
9   |#10:635|ExShare|378  |amex|244  |116  |18   |4 
 |0   |2015-10-15 
00:0...|2015-11-26T17:09:00.81...|2015-11-26T17:09:00.81...
10  |#10:635|ExShare|378  |amex|244  |116  |18   |4 
 |0   |2015-10-15 
00:0...|2015-11-26T17:09:00.81...|2015-11-26T17:09:00.81...
11  |#10:635|ExShare|378  |amex|244  |116  |18   |4 
 |0   |2015-10-15 
00:0...|2015-11-26T17:09:00.81...|2015-11-26T17:09:00.81...
12  |#10:638|ExShare|379  |amex|161  |203  |15   |3 
 |0   |2015-10-16 
00:0...|2015-11-26T17:09:02.46...|2015-11-26T17:09:02.46...



obviously the datasets are queried several times.
Additionally, when trying to filter by » where exchange = 'nasdaq' «
nothing is returned by the query.

Can anybody give a hint, 

[orientdb] Re: Orientdb responds with nio more than 20 results

2015-11-07 Thread hartmut bischoff
Have you tried »limit -1« ?

On Friday, November 6, 2015 at 3:50:16 PM UTC+1, Manolis Tsilikidis wrote:
>
> Hello, I am using *Orientdb4r *gem in a *Ruby on Rails* application in 
> order to communicate with an orientdb database set up on a remote server of 
> the organization that I work for. I am querying the database and everything 
> seems fine, despite the fact that no matter what LIMIT I set in the query ( 
> or do not set LIMIT at all ) the number of results is always the same ( 20 
> results ). I tried to find a solution on this, but withl no luck...
>
> In the WEB gui that orientdb provides, I have more than 2000 entries in 
> each class. I can configure ( in the setting section ) to show the needed 
> number of results. Is there a way to configure this in the *orientdb4r* 
> gem?
>
> Any Ideas anyone?
>
> Any help is appreciated.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] [announcement] Moving to StackOverflow!

2015-10-21 Thread hartmut bischoff


On Sunday, October 18, 2015 at 8:58:35 PM UTC+2, normanLinux wrote:
>
> *Definitely* not twitter. I, for one, don't use the likes of Twitter or 
> Facebook
>
> I still vote for staying here or moving to a dedicated forum.  As others 
> have pointed out, Stackoverflow is *not* a good fit as a replacement. 
>  Not available for announcements, and threads arbitrarily closed because 
> they elicit opinions
>
>
 Count my vote here too!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: new performance test from Arango

2015-10-21 Thread hartmut bischoff
in particular as Arango did use the 2.2 alpha with so called performance 
improvements.

The good thing is, that the OrientDB is not trying the same that VW did 
when they discovered that their engines where badly constructed. 
But 
Shortest Path: Arango 61 ms, Orientdb 35 sec, this is truly unacceptable. 
As well as 464 ms for a neighbour-search in Arango  compared with 2,4 sec. 
in OrientDB.

Instead of improving the Database by adding fancy new features, maybe its 
best to stabilize the Project and work on a reliable Production-Release.
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: SELECT a node who has 2 in links following links

2015-08-29 Thread hartmut bischoff
This example is included in the usecase-specs of ActiveOrient.

Thanks for bringing this up
  2 =begin
  3 BOOKs EXAMPLE
  4 
  5 There are several Books. And there is a Table with Keywords.
  6 
  7 The Keywords are associated to the books, this is realized via an Edge 
»has_content«
  8 
  9 Thus
 10 
 11   Book = @r.create_vertex_class :book
 12   Word = @r.create_vertex_class :word
 13   HC = @r.create_edge_class :has_content
 14 
 15 Books have a title and many edges to Word.
 16 Words have items, both properties use automatic indexes
 17 
 18   Book.create_property( :title, type: :string, index: :unique )
 19   Word.create_property( :item , type: :string, index: :unique )
 20 
 21 for each word:
 22   HC.create_edge from: this_book, to: this_word 
 23 
 24 To query which books have a given set of words:
 25for each word this query loads a collection of books
 26 
 27   query = OrientSupport::OrientQuery.new  from: Word, projection: 
expand(in('HasContent'))#
 28
 29the query is completed by 
 30
 31   query.where(  item: '{given word}'  )
 32 
 33 The pieces are tied together in a final query »q«
 34 
 35   q =  OrientSupport::OrientQuery.new projection: 'expand( $z )'
 36   desired_words = [ 'Land', 'Quartal' ]
 37   intersects =  Array.new 
 38 
 39   desired_words.each_with_index do | word, i |
 40   symbol = ( i+97 ).chr #  convert 1 - 
'a' 
 41   q.let symbol = query.where(  item: word  )   #  add 
where-statement to let-block
 42   intersects  $#{symbol}#  remember 
what is added
 43   end
 44   q.let $z = Intersect(#{intersects.join(', ')})  #  add 
intersect-statement as last entry to let-block
 45   result = Word.query_database  q, set_from: false
 46   
 47 The generated Query »q« for two words that should appear in any book:
 48 
 49 select expand( $z ) let $a = ( select expand(in('HasContent')) from 
Word where item = 'Land' ), $b = ( select expand(in('HasContent')) from 
Word where item = 'Quartal' ), $z = Intersect($a, $b) 
 50 
 51 =end
 52 
 53 describe OrientSupport::OrientQuery do
 54   before( :all ) do
 55  ADJUST user+password 
###
 56 ActiveOrient::OrientDB.default_server= { user: 'hctw', password: 
'hc' }
 57 @r = ActiveOrient::OrientDB.new database: 'ArrayTest'
 58 TestQuery = @r.open_class model_query
 59 @record = TestQuery.create
 60   end # before
 61 
 62   context Books Words example , focus: true do
 63 before(:all) do
 64   @r.delete_class :book
 65   Book = @r.create_vertex_class :book
 66   Book.create_property( :title, type: :string, index: :unique )
 67   @r.delete_class :word
 68   Word = @r.create_vertex_class :word
 69   Word.create_property( :item , type: :string, index: :unique )
 70   @r.delete_class :has_content
 71   HC= @r.create_edge_class :has_content
 72 
 73 end
 74 it check structure do
 75   expect( @r.class_hierachie( base_class: 'V').sort ).to eq 
[Book.new.classname, Word.new.classname]
 76   expect( @r.class_hierachie( base_class: 'E') ).to eq 
[HC.new.classname]
 77 end
 78 
 79 it put test-content do
 80  fill_database = -(sentence, this_book ) do
 81sentence.split(' ').each do |x|
 82  this_word = Word.update_or_create where: { item: x }
 83  this_edge = HC.create_edge from: this_book, to: this_word  if 
this_word.present?
 84end
 85   end
 86   words = 'Die Geschäfte in der Industrie im wichtigen 
US-Bundesstaat New York sind im August so schlecht gelaufen wie seit mehr 
als sechs Jahren nicht mehr Der entsprechende Empire-State-Index fiel 
überraschend von …plus  Punkten im Juli auf minus 14,92 Zähler Dies 
teilte die New Yorker Notenbank Fed heut mit Bei Werten im positiven 
Bereich signalisiert das Barometer ein Wachstum Ökonomen hatten eigentlich 
mit einem Anstieg auf 5,0…Punkte gerechnet'
 87   this_book =  Book.create title: 'first'
 88   fill_database[ words, this_book ]
 89   expect( Word.count ).to be  10
 90 
 91  words2 = 'Das Bruttoinlandsprodukt BIP in Japan ist im zweiten 
Quartal mit einer aufs Jahr hochgerechneten Rate von Prozent geschrumpft Zu 
Jahresbeginn war die nach den USA und China drittgrößte Volkswirtschaft der 
…Welt noch um  Prozent gewachsen Der Schwächeanfall wird auch als 
Rückschlag für Ministerpräsident Shinzo Abe gewertet der das Land mit einem 
Mix aus billigem Geld und Konjunkturprogramm aus der Flaute bringen will   
   …Allerdings wirkte sich die heutige Veröffentlichung auf die 
Märkten nur wenig aus da Ökonomen mit einem schwächeren zweiten Quartal 
gerechnet hatten'
 92  this_book =  Book.create title: 'second'
 93  fill_database[ words2, this_book ]
 94  expect( Word.count ).to be   100
 95 end
 96 it Query 

[orientdb] Re: SELECT a node who has 2 in links following links

2015-08-27 Thread hartmut bischoff
Hi,
I used your example to calibrate the ruby-interface active-orient (and 
could improve several things).
Have you set proper indexes to speed up the query? 


Here is the Active-Orient-Solution (as always outlined as RSpec-Test)  
all tests are passing.


49   context Books Words example , focus: true do
50 before(:all) do
51   @r.delete_class :book
52   Book = @r.create_vertex_class :book
53   Book.create_property( :title, type: :string, index: :unique )
54   @r.delete_class :word
55   Word= @r.create_vertex_class :word
56   Word.create_property( :item , type: :string, index: :unique )
57   @r.delete_class :has_content
58   HC= @r.create_edge_class :has_content
59 
 60 end
61 it check structure do
62   expect( @r.class_hierachie( base_class: 'V').sort ).to eq [Book.new
.classname, Word.new.classname]
63   expect( @r.class_hierachie( base_class: 'E') ).to eq [HC.new.
classname]
64 end
65 
 66 it put test-content do
67  fill_database = -( sentence, this_book ) do
68sentence.split(' ').each do |x|
69  this_word = Word.update_or_create where: { item: x }
70  this_edge = HC.create_edge from: this_book, to: this_word 
 71end
72   end
73   words = 'Die Geschäfte in der Industrie im wichtigen 
US-Bundesstaat New York sind im August so schlecht gelaufen wie seit mehr 
als sechs Jahren nicht mehr Der entsprechende Empire-State-Index fiel 
überraschend von plus  Punkten im Juli auf minus 14,92 Zähler Dies teilte 
die New Yorker Notenbank Fed heut mit Bei Werten im positiven Bereich 
signalisiert das Barometer ein Wachstum Ökonomen hatten eigentlich mit 
einem Anstieg auf 5,0 Punkte gerechnet'
74   this_book =  Book.create title: 'first'
75   fill_database[ words, this_book ]
76   expect( Word.count ).to be  10
77  
78  words2 = 'Das Bruttoinlandsprodukt BIP in Japan ist im zweiten 
Quartal mit einer aufs Jahr hochgerechneten Rate von Prozent geschrumpft Zu 
Jahresbeginn war die nach den USA und China drittgrößte Volkswirtschaft der 
Welt noch um  Prozent gewachsen Der Schwächeanfall wird auch als Rückschlag 
für Ministerpräsident Shinzo Abe gewertet der das Land mit einem Mix aus 
billigem Geld und Konjunkturprogramm aus der Flaute bringen will Allerdings 
wirkte sich die heutige Veröffentlichung auf die Märkten nur wenig  aus da 
Ökonomen mit einem schwächeren zweiten Quartal gerechnet hatten'
79  this_book =  Book.create title: 'second'
80  fill_database[ words2, this_book ]
81  expect( Word.count ).to be   100 
 82 end
83 it Subquery Initialisation do
84   query = OrientSupport::OrientQuery.new where:  out('HasContent').item 
IN ['Quartal','Land']
85   result= Book.query_database query
86   expect( result).to be_a Array
87   expect( result).to have_at_least(1).item
88   queried_book =  result.first
89   expect( queried_book ).to be_a ActiveOrient::Model::Book
90   expect( queried_book.title ).to eq 'second'
91   
92 end
93   end



-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] How do Indexes work?

2015-08-26 Thread hartmut bischoff
Hi,

I thought I read the manual about indexing carefully and was impressed how 
Indexing works in OrientDB.

Implemented the basic concepts in  ActiveOrient and started testing.

When using a plain Class (TestModel) this test works perfect. 

135   context ActiveRecord mimics  do
136before(:all){ (0..45).each{|x| TestModel.create  test: x  }}
(..)
144 it get a set of documents queried by where  do
147   nr_23=  TestModel.where  test: 23 
148   expect( nr_23 ).to have(1).item
149   expect( nr_23.first.test).to eq 23
150 end

But - if I create a composite Index:

74 it create several  properties with a composite index do
 75 @r.open_class :industry
 76 @r.delete_class 'index_test'
 77 TestIndex = @r.open_class index_test 
 78 TestIndex.create_properties(  test:  {type: :integer},
 79  symbol: { type: :string },
 80  industries: { type: 'LINKMAP', 
linked_class: 'Industry' }   ) do
 81   { test_ind: :unique }  #  this 
block creates a composite  Index covering all properties just created i.e. 
test,symbol,industries
 82  end
 83 expect( TestIndex.get_properties[:properties] ).to have(3).items
 84 expect( TestIndex.get_properties[:indexes] ).to have(1).item
 85 end
 86 
 87 it put some data into the class do
 88  
 89   (0..45).each{|x| TestIndex.create  test: x  }
 90   expect( TestIndex.count ).to eq 46
 91   expect( TestIndex.where test: 23 ).to have(1).item
 92 end
 93   end

The submitted query (Row 91)

select from IndexTest where test =  23  

does not return any record.


I thought, a composite Index is an addition to the class, enabling fast 
queries covering all index-components. Simple non-index-based queries 
should work as in case of the index-free-class. But it didn't.

Is this the desired behaviour?  How to proceed, if  a plain property is 
subject of a query in presence of a composite-index? 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] ActiveOrient gem released

2015-08-18 Thread hartmut bischoff

Hi Alltogether

Accessing of OrientDB from Ruby is a little bit simpler.
A Gem of ActiveOrient is published on rubygems.


To use it, only a few lines of codes are required

 require 'bundler/setup'
 require 'active-orient'

 ActiveOrient::OrientDB.default_server = { user: 'xx', password: '***' }


 r = ActiveOrient::OrientDB.new  database: 'First'
   = I, [2015-08-18T09:49:18.858758 #88831]  INFO -- OrientDB#Connect: 
Connected to database First
   = #ActiveOrient::OrientDB:0x00048d0488 
@res=#RestClient::Resource:0x0004927288 
   @url=http://localhost:2480;, @block=nil, 
   @options={:user=xx, :password=***}, @database=First, 
@classes=[] 

  r.open_class 'my_first_orient_class'

Status of the Project is changed from pre-alpha to pre-beta





On Tuesday, June 30, 2015 at 2:27:20 PM UTC+2, hartmut bischoff wrote:

 Hi alltogether

 because the small project pretty much goes the ORM-Way, I renamed it to 

 ActiveOrient


 https://github.com/topofocus/active-orient


-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Save multi dimensional array field in object db

2015-08-16 Thread hartmut bischoff
Hi,

I'm working on a similar solution in ruby.
Could'nd find any difficulty on the orientdb-side:

  
 92 context 'work with multi dimensional Arrays', focus:true do
 93 let( :multi_array ){ a = [1,2,3];  b = [ :a, :b, :c ]; [ a, b ] }
 94 it 'intitialize' do
 95   new_record = TestModel.create ll: multi_array
 96   expect( new_record.ll ).to eq [[1, 2, 3], [a, b, c]]
 97 
 98 end
 99 
100 it use saved dataset for update do
101   dataset =  TestModel.create ll: []# create schemaless 
property type embedded
102   expect{ dataset.update set: {ll: multi_array  } }.to change{ 
dataset.version }
103   # explicit reread the dataset
104   data_set =  TestModel.last
105   expect( data_set.ll ).to eq [[1, 2, 3], ['a', 'b', 'c']]
106 
107 end
108 
109   end
11

The test passed:

20:26:27 - INFO - Running: spec/lib/array_spec.rb
Run options: include {:focus=true}

OrientSupport::Array
I, [2015-08-16T20:26:28.871908 #113777]  INFO -- OrientDB#DropDatabase: 
Database ArrayTest NOT present -- creating
I, [2015-08-16T20:26:31.802297 #113777]  INFO -- OrientDB#CreateDatabase: 
Database ArrayTest successfully created and stored as working database
  work with multi dimensional Arrays
  intitialize
  use saved dataset for update

Finished in 3.71 seconds (files took 0.32951 seconds to load)
2 examples, 0 failures


ActiveOrient uses the http REST-API.



On Saturday, August 15, 2015 at 11:16:17 PM UTC+2, Tim wrote:

 Hey all,

 i just came across orient db a few days ago and now i am trying to migrate 
 a xml based persistence mechanism of a legacy application to orientdb (the 
 object db seemed quite a good idea for that purpose).

 When serializing a few classes i get the following exception: Caused by: 
 java.lang.IllegalArgumentException: Type EMBEDDED must be a multi value 
 type (collection or map)

 I guess the serializer has problems with the following fields: 

 private double lossProbability[][];
 private double downgradeRisk[][];


 Would appreciate a heads up on how i can solve that problem.

 Thanks in advance!


-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: EmbeddedSet vs LinkSet

2015-08-13 Thread hartmut bischoff
Hi,
I think this is related to 

 https://groups.google.com/d/msg/orient-database/fcsxvHwh28s/0SzH9Xl4CgAJ


On Thursday, August 13, 2015 at 11:14:41 AM UTC+2, Athanassios Hatzis wrote:

 @Alessandro you think. but I have tested this and it looks like it 
 does not behave correctly ;-)

 Plus the fact that you have not replied if there is any purpose of not 
 restricting the options of Link_Type.

 e.g. EmbeddedSet of EmbeddedSet for example..

 Thanks any way


-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Access denied after Updating to 2.1.0

2015-08-06 Thread hartmut bischoff
Hi,

I just copied the config/orientdb-server-config.xml from the previous 
instrallation (2.1-rc3) to the config-directory of the downloaded 2.1.0 
 edition. 

I modified the user-section with a custom user and a plain password.

After restarting the server, I am no longer able to access the database 
using the user/password-combination.

Do I have to switch to encrypted passwords in the config-file?
If yes: Where can I find the documentation to proceed?
If no: which parts of the config-file have to be copied from the previous 
installation to the new production environment?

(The database is running as a service on an ubuntu-server)


Thanks in advance

hartmut

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Access denied after Updating to 2.1.0

2015-08-06 Thread hartmut bischoff
Yes, my fault.
I did not change the file-permissions correctly.

The only database-user is defined for temp. 
Because I perform many tests where databases (and any predeclared classes) 
 are deleted and recreated prior to the execution of the test-suite, I 
added a user for this pupose.

btw: all test passed with the new version.
Congratulations.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] REST API like -- HTTP Version Not Supported

2015-08-06 Thread hartmut bischoff
Even with the Production-Release  I cannot submit a simple select from xq 
where a like 'df%'  query.

This is the test-query:
select from ( select expand( ll ) from ModelTest)   where att like '4%' 

It's transmitted via:
batch_uri: http://localhost:2480/batch/MyTest
post: 
{transaction:true,operations:[{type:cmd,language:sql,command:select
 
from ( select expand( ll ) from ModelTest) where att like '4%' }]}

The Error-Message:  505 HTTP Version Not Supported

However:
this query is processed regular:

select from ( select expand( ll ) from ModelTest)   where att = '30 
attribute' 
batch_uri: http://localhost:2480/batch/MyTest
post: 
{transaction:true,operations:[{type:cmd,language:sql,command:select
 
from ( select expand( ll ) from ModelTest) where att = '30 attribute' }]}


Any Suggestions where to look, what to change?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: How flexible is the database?

2015-08-05 Thread hartmut bischoff
By further investigating ...

the Array not recognized correctly by Studio can be queried the usual way:

select from (select expand(ll) from ModelTest ) where att like '4%'


returns an Array with expanded TestLinkClasses starting with

{
result: [
{
@type: d,
@rid: #10:3,
@version: 1,
@class: TestLinkClass,
att: 4 attribute
},


Thus I guess that's valid to store unsorted data in an array. And I am able 
to use the embedded properties in the usual manner, no matter how »chaotic« 
the array is organized.

 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Get the class heirarchy of a vertex

2015-07-31 Thread hartmut bischoff
Hi,

in my view, thats not the job of a database-request. Instead its a matter 
of your OOP-Design.

I thought, even Java has basic OOP-Support.
So why do you not assign the retrieved Class to the proper Java-Object?

I have done this for ruby. There its just a matter of two lines of code:
def self.orientdb_class name
   klass = Class.new( self )
   name =  name.to_s.camelize
   if self.send :const_defined?, name
  self.send :const_get, name  # returns the Const
   else
  self.send :const_set  , name , klass  # creates and returns the 
Const
 end
   end


Elsewhere you simply define the Class in the usual way. Everytime a 
Database-object is fetched, I call BaseClass.orientdb_class( vertex_name ) 
 and get the proper Ruby-class. 
The ruby-class knows about its parents and has the proper methods to deal 
with the fetched content.
Take a look at ActiveOrient

Maybe its not that simple in Java, but as Jruby exists, somehow it must 
work.

On Friday, July 31, 2015 at 12:59:00 AM UTC+2, Chris Whalen wrote:

 Has anyone figured out how to return the parent classes of a vertex as a 
 projection?  When I get the vertex, I need to know what it's parent classes 
 are.  So if I get a Square classed vertex, I need to know that it is of a 
 sub class of Rectangle and Shape.




-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] How flexible is the database?

2015-07-31 Thread hartmut bischoff

Hi altogether,

I'm still working on the Ruby-ORM-Adapter to OrientDB, focussing on the 
behavior of embedded lists, lightweight edges
In Ruby they are serialized as ordinary Arrays. Thus - they should behave 
like Arrays in the ORM-Adapter, too.

In Ruby  the method  is used to add an element to an array, thus in 
activeOrient after initializing the Classes TestMode and LinkClass this code

 59  new_record = TestModel.new_instance ll: [ ]   
 # new document with an empty array
 60   (1..9).each do |i|
 61 new_record.ll  LinkClass.new_instance( att: #{i} attribute 
)
 62 new_record.ll  i
 63   end


creates an Array with 18 Elements:

1 attribute ; 1 ; 2 attribute ; 2 ; 3 attribute ; 3 ; 4 attribute ; 4 ; 5 
attribute ; 5 ; 6 attribute ; 6 ; 7 attribute ; 7 ; 8 attribute ; 8 ; 9 
attribute ; 9
  

each  link to the LinkClass-Instance  is followed by a Number 

Now the surprise. When checking the Record in Studio I got:

METADATAPROPERTIES
@rid
@version
@class
ll
created_at
updated_at
#31:0 
http://localhost:2480/studio/index.html#/database/hc_database/browse/edit/31:0
7
ModelTest 
http://localhost:2480/studio/index.html#/database/hc_database/schema/editclass/ModelTest
[5,t,78]
2015-07-31T09:13:14.736 02:00
2015-07-31T09:13:14.736 02:00
#31:1 
http://localhost:2480/studio/index.html#/database/hc_database/browse/edit/31:1
19
ModelTest 
http://localhost:2480/studio/index.html#/database/hc_database/schema/editclass/ModelTest
#33:0 
http://localhost:2480/studio/index.html#/database/hc_database/browse/edit/33:0
 #33:1 
http://localhost:2480/studio/index.html#/database/hc_database/browse/edit/33:1
 #33:2 
http://localhost:2480/studio/index.html#/database/hc_database/browse/edit/33:2
 #33:3 
http://localhost:2480/studio/index.html#/database/hc_database/browse/edit/33:3
 #33:4 
http://localhost:2480/studio/index.html#/database/hc_database/browse/edit/33:4
 #33:5 
http://localhost:2480/studio/index.html#/database/hc_database/browse/edit/33:5
 ..More(3)


The Numeric-Items are ignored, only the links are displayed, and only 9 
Array-Elements are detected.

However, if I reverse the order of entries (adding first the number then 
the link), Studio does not recognize the links but displays all elements.

METADATAPROPERTIES
@rid
@version
@class
ll
created_at
updated_at
#31:0 
http://localhost:2480/studio/index.html#/database/hc_database/browse/edit/31:0
7
ModelTest 
http://localhost:2480/studio/index.html#/database/hc_database/schema/editclass/ModelTest
[5,t,78]
2015-07-31T09:30:43.522 02:00
2015-07-31T09:30:43.522 02:00
#31:1 
http://localhost:2480/studio/index.html#/database/hc_database/browse/edit/31:1
19
ModelTest 
http://localhost:2480/studio/index.html#/database/hc_database/schema/editclass/ModelTest
[1,#33:0,2,#33:1,3,#33:2,4,#33:3,5,#33:4,6,#33:5,7,#33:6,8,#33:7,9,#33:8]
10255010010005000

   

Am I bending the Datamodel of Orientdb to much or is this just a bug in 
studio?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Get the class heirarchy of a vertex

2015-07-31 Thread hartmut bischoff


On Friday, July 31, 2015 at 10:20:08 PM UTC+2, Chris Whalen wrote:

 I don't disagree.  Normally, I would not expect a RDB request to return 
 this information but due to orientdb's polymorphism capabilities I think it 
 would be reasonable.  As my schema is not static, I cannot rely on a java 
 object to determine a class' ancestors; new sub classes will be defined 
 during run time


For this purpose I maintain a »classes-Object« which is updated whenever a 
class is created or removed. Then there is a method to get the 
class-hierarchy of the database, based on the object-root
https://github.com/topofocus/active-orient/blob/master/lib/rest.rb rows 
160-220

If you want to go the other way, just define a method 'superClass' for 
every fetched Object. Then Method.superClass.superClass.(...) reveals the 
hole tree of the corresponding ruby-objects. 
Realisation in Ruby: 
https://github.com/topofocus/active-orient/blob/master/lib/model.rb rows 
56-60


 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Graph Design Question

2015-07-31 Thread hartmut bischoff
Hi,
perhaps the best approach is to use the Database as a object-based tool 
which provides any data you need.
Then to solve the task you would first design a reliable Object-structure 

So – the first steps are not different from the RDMS-Approach.

The Questions to answer are for example:
People work in companies
Companies employ people
Companies fired people
People fired by companies

etc.

In the classic RDMS world you would consider a m:n-relation.
This implies to use bidirectional edges in orientdb.
The next step is straightforward: What attributes are necessary to describe 
the Relationship between People and Companies. These are the attributes for 
the edges.
You get the additional benefit that you don't have to know all questions to 
be answered (as in RDMS). You just provide some basic properties and  leave 
anything else to the user.

(This is just a personal suggestion, not a professional advise)


On Friday, July 31, 2015 at 1:51:18 AM UTC+2, Eric24 wrote:

 I came across a real-world example recently that seems to cry out for 
 normal edges with properties (as opposed to lightweight edges): The 
 simplified version is a list of people and the companies they have worked 
 for. It seems to me that an edge class between person and company classes 
 with start date and end date properties (and maybe a reason for 
 leaving property) would be ideal for this. I'm still relatively new to 
 OrientDB and graph databases in general, so I'm wondering if there is a 
 better/preferred way to do this (or even an alternative)? I can envision a 
 model with an employment vertex as well, using lightweight edges to 
 connect people---employment---company, where the employment vertex would 
 have the date and other properties for a given employment period. Is this 
 better? Worse? Why?
 --Eric



-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] When do @fieldtypes appear?

2015-07-29 Thread hartmut bischoff
Hi alltogether

if I work in schemless-mode  strange things are happening.

I start with an empty class »NewTest using the activeOrient-Ruby interface

first_record =  ThisTest.new_document attributes: { normal_array: [1,2,3,'z'
,'u'], some_link: #33:0 }


Querying the class in studio returns this json

{
result: [
{
@type: d,
@rid: #41:0,
@version: 1,
@class: ThisTest,
normal_array: [
1,
2,
3,
z,
u
],
some_link: #33:0,
@fieldTypes: some_link=x
}
],

(as expected)

Lets extend the record with an embedded list of links.
I expect the apearance of another @fieldtype-entry – but:

 first_record.update set: { link_array: [ #32:0, '#32:3', '#32:29' ] }
 = #REST::Model::ThisTest:0x0003752850 
   @metadata={type=d, class=ThisTest, version=2, 
fieldTypes=some_link=x, cluster=41, record=0}, 
   @attributes={normal_array=[1, 2, 3, z, u], 
some_link=#33:0, 
created_at=2015-07-29 19:26:08 +0200, 
updated_at=2015-07-29 19:26:08 +0200, 
link_array=[#32:0, #32:3, #32:29]} 

 first_record.link_array
 = [#REST::Model::Minute:0x00036c7070 
@metadata={type=d, class=Minute, version=1, 
fieldTypes=nil, cluster=32, record=0}, 
@attributes={label=0, created_at=2015-07-29 19:32:19 +0200, 
updated_at=2015-07-29 19:32:19 +0200}, 
 #REST::Model::Minute:0x000369fdb8 
@metadata={type=d, class=Minute, version=1, 
fieldTypes=nil, cluster=32, record=3}, 
@attributes={label=3, created_at=2015-07-29 19:32:19 +0200, 
updated_at=2015-07-29 19:32:19 +0200}, 
 #REST::Model::Minute:0x00036967b8 
@metadata={type=d, class=Minute, version=1, 
fieldTypes=nil, cluster=32, record=29}, 
@attributes={label=29, created_at=2015-07-29 19:32:19 +0200, 
updated_at=2015-07-29 19:32:19 +0200}] 


Orientdb is using a smart autoloading-feature which resolves the links 
correctly.
The result is similar to the findings in Studio.

The json confirms the activeOrient output: only one @fieldtype entry:
{
result: [
{
@type: d,
@rid: #41:0,
@version: 2,
@class: ThisTest,
normal_array: [
1,
2,
3,
z,
u
],
some_link: #33:0,
created_at: 2015-07-29T19:26:08.313 02:00,
updated_at: 2015-07-29T19:26:08.313 02:00,
link_array: [
#32:0,
#32:3,
#32:29
],
@fieldTypes: some_link=x
}
],


Why is the embedded list not included in @fieldtypes?
After reading the documentation I thought, the @fieldtypes are used to 
define special data-formats and I want to implement a more robust 
autoloading, which reflects the database-definitions rather then relying on 
string-pattern.

Thanks in advance 

Hartmut

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Curious about Time Series Use Case

2015-07-19 Thread hartmut bischoff


On Saturday, July 18, 2015 at 7:39:56 PM UTC+2, Eric24 wrote:
 

  why the links between the various date parts was done using a LINKMAP 
 instead of edges? To my way of thinking, using edges would be more graph 
 like, where as LINKMAP is more document like. What are the pros/cons?


For one its the simplicity of queriing, eg

  SELECT month[3].day[20].hour[10].logs FROM Year WHERE year = 2012

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: OrientDB Ruby driver: we need help!

2015-07-18 Thread hartmut bischoff



 Any news about supporting Ruby?

started to work on a ORM-Solution,
already works in one project, but still in early alpha.

https://github.com/topofocus/active-orient

ActiveOrient

Access OrientDB from Ruby using the robust high-level REST-HTTP-API

The Package ist tested with Ruby 2.2.1 and Orientdb 2.1 (2.0).

It is written to store data, gathered by a Ruby-program ( ib-ruby in 
particular), into an OrientDB-Database,to query the Database in a rubish 
(aka activeRecord) manner and then to deal conviently with 
ActiveModel-Objects.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Time Series Java API example

2015-07-16 Thread hartmut bischoff
As I see it, only simple document-queries are used in this example.
So why is it build with vertices instead of ordenary classes?
I prefer to  derive anything from a given base-class, eg TS then using V

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Select vertexes based on inherited class type

2015-07-06 Thread hartmut bischoff


On Monday, July 6, 2015 at 12:01:26 PM UTC+2, @raph wrote:


  I need to execute only one query to get all the data I am looking for.



right, just call database/{database_name}.get
and you get anything.
you just have to grep the data from the json-data-object

http://orientdb.com/docs/last/OrientDB-REST.html#database

 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Select vertexes based on inherited class type

2015-07-05 Thread hartmut bischoff
Hi, 
don't know the java-way to do it, but have a solution in ruby.
With the active-orient-ORM-Adapter 
( https://github.com/topofocus/active-orient )
you might do

REST::Model.orientdb = ror = REST::OrientDB.new
puts  r.class_hierachie( base_class: 'Produit' ).map{|c| #{c}: \t 
#{r.count_documents( o_class: c)} }.join(\n)  


With a similar schema I got

topo@gamma:~/activeOrient$ irb  /* call the  interactive ruby interpreter /*

 2.2.1 :001  require './config/boot'

  = true 

 2.2.1 :002  r=   REST::Model.orientdb = REST::OrientDB.new

  = #REST::OrientDB:0x0003e08c58 
 @res=#RestClient::Resource:0x0003e6b970 @url=http://localhost:2480;, 
 @block=nil, @options={:user=hctw, :password=**}, 
 @database=hc_database, @classes=[] 

 2.2.1 :003  puts  r.class_hierachie( base_class: 'Contracts' ).map{|c| 
 #{c}: \t #{r.count_documents( o_class: c)} }.join(\n)  

 /*url: query/hc_database/sql/select COUNT(*) from Forexes  */

 /*url: query/hc_database/sql/select COUNT(*) from Futures   */

 /*url: query/hc_database/sql/select COUNT(*) from Options   */

 /*url: query/hc_database/sql/select COUNT(*) from Stocks */

 Forexes:  1 

 Futures:  1 

 Options:  2 

 Stocks:  60 

  = nil 





On Saturday, July 4, 2015 at 10:10:33 PM UTC+2, @raph wrote:

 Hi Lvc@

 I am using OrientDB and I am trying to do something new (I found no one 
 talking about it)

 I have this schema : 
 Vertex :
 Produit (abstract class)
 JBoss ( extends from Produit)
 WAS ( extends from Produit)
 Apache ( extends from Produit)

 And I want to get this result :
 class  count
 
 Jbossx
 Apache y
 WAS z

 Where x,y and z are the number of records of each class.

 I've tried this query : select @class, count(*) from Produit and I got 
 this :

 class  count
 
 JbossD

 where D = x+y+z

 Any ideas?

 On Wednesday, January 28, 2015 at 8:11:20 PM UTC+1, Lvc@ wrote:

 You can use the instanceof operator:

 WHERE @this instanceof Node

 Lvc@


 On 28 January 2015 at 19:04, Chris Whalen cwhal...@gmail.com wrote:

 I am developing a system where (for example):

 *Vertices*
 Entity extends V
 Document extends Entity
 Node extends Entity
 Country extends Node
 Language extends Node
 ... more vertices can be created during run time but they all extend 
 from the core Entity class or another class that already exists

 *Edges*
 ContainedIn extends E

 For example, I want to get a tree structure from a root vertex (17:0) 
 using the 'ContainedIn' edge.  I only want the vertexes that are of the 
 'Node' type.  That mean I want back any Node, Country, or Language, or any 
 other vertex that has Node as a parent.  If there was only a known set of 
 possible types, I would simply put in a where clause that checks against a 
 list of @class types.  Unfortunately, since new classes can and will be 
 created by the end user I might not know all the classes that inherit from 
 Node.

 *What I know can be done:*
 select @rid, Id, Name_ENG, $path from (traverse in('ContainedIn') from 
 17:0 where $depth  4) where @class in [Node, Language, Country]
  
 *What I would like to do:*
 select @rid, Id, Name_ENG, $path from (traverse in('ContainedIn') from 
 17:0 where $depth  4) where *@class inheritsFrom Node*

 Does anyone have any recommendations on how to build such a query?

 -- 

 --- 
 You received this message because you are subscribed to the Google 
 Groups OrientDB group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to orient-databa...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: How far can the dot notation go?

2015-07-01 Thread hartmut bischoff
Its definitively a matter of your schema.
I tried the excersise in the ruby active-orient-implementation,  works like 
a charme, even with 4 dots ...

If it works with an adapter in pre-alpha-stage who uses the high-level 
http-rest-api, then any other environment should work, too

Attached you find the log:

 topo@gamma:~/new_hctw$ irb
2.2.1 :001  require './config/boot'
Using development-environment
 initialize  = true 
2.2.1 :002  ror = REST::OrientDB.new
 = #REST::OrientDB:0x00046f1a90 
@res=#RestClient::Resource:0x00046c0af8 @url=http://localhost:2480;, 
@block=nil, @options={:user=hctw, :password=**}, 
@database=hc_database, @classes=[] 
2.2.1 :003  REST::Model.orientdb = ror
 = #REST::OrientDB:0x00046f1a90 
@res=#RestClient::Resource:0x00046c0af8 @url=http://localhost:2480;, 
@block=nil, @options={:user=hctw, :password=**}, 
@database=hc_database, @classes=[] 
2.2.1 :004  oi=  ror.create_class 'Openinterest'
 = REST::Model::Openinterest 
2.2.1 :005  ooi = oi.all.first
 = #REST::Model::Openinterest:0x000443ede8 @metadata={type=d, 
class=Openinterest, version=5, 
fieldTypes=fetch_date=t,contracts=z, cluster=13, record=0}, 
@attributes={fetch_date=2015-06-02 00:00:00, contracts=[#21:36, 
#21:35, #21:34, #21:33, #21:32, #21:31, #21:30, #21:29, 
#21:28, #21:27, #21:26, #21:25, #21:24, #21:23, #21:22, 
#21:21, #21:51, #21:49, #21:50, #21:47, #21:48, #21:45, 
#21:46, #21:43, #21:44, #21:41, #21:42, #21:39, #21:40, 
#21:37, #21:38, #21:4, #21:3, #21:0, #21:17, #21:18, 
#21:19, #21:20, #21:13, #21:14, #21:15, #21:16, #21:9, 
#21:10, #21:11, #21:12, #21:5, #21:6, #21:7, #21:8], 
created_at=2015-07-01 15:27:41 +0200, updated_at=2015-07-01 15:27:41 
+0200} 
2.2.1 :006  ooi.contracts.first.subcategory.category.industry
 = #REST::Model::Industries:0x0004af88f0 @metadata={type=d, 
class=Industries, version=8, fieldTypes=categories=n, 
cluster=17, record=1}, @attributes={categories=[#15:13, #15:4, 
#15:1], name=Basic Materials, created_at=2015-07-01 15:27:58 
+0200, updated_at=2015-07-01 15:27:58 +0200} 
2.2.1 :007  


scott, thanks for this nice feature-hint. I start to like the oo-behavior 
of the document-db.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: How far can the dot notation go?

2015-06-30 Thread hartmut bischoff


On Monday, June 29, 2015 at 1:48:14 PM UTC+2, scott molinari wrote:

 A polite bump for the request for confirmation above.

 Scott


don't know if this covers your problem, but 

assuming you build this schema

 99   ach.queries  'create property Industries.categories linkset'
100   ach.queries  'create property Categories.subcategories linkset'
101   ach.queries  'create property Categories.industry link'
102   ach.queries  'create property Subcategories.category link'
103   ach.queries  'create property Subcategories.contracts linkset'

then 
select name, categories.name, categories.subcategories.contracts.symbol 
from Industries

gives some results 
PROPERTIES name categories categories2 
Technology[Software,Semiconductors,Computers]
[[MSFT,ORCL],[MU,AMD,QCOM,AMAT,INTC],[BBRY,AAPL]]
Basic Materials[Mining,Iron/Steel,Chemicals]
[[AA,ABX,FCX],[VALE,CLF],[BAS,DOW]]
Financial[Insurance,Banks]
[[AIG],[JPM,D05,C,WFC,BAC,NBG,MS]]
(...)

BUT - if you try to try to narrow the results by adding »where« terms, 
nothing  changes.
The dot-notation just returns the normal object-orientated-result-set. 

This are personal findings, which haven'd been confirmed by the programmers 

hartmut

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] ActiveOrient

2015-06-30 Thread hartmut bischoff
Hi alltogether

because the small project pretty much goes the ORM-Way, I renamed it to 

ActiveOrient


https://github.com/topofocus/active-orient

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: embedded , embeddedList ect

2015-06-18 Thread hartmut bischoff
Still don't get the behavoir of embedded.

wrote a test in my ruby-adapter:

140 it work with a schemaless approach do
141 
142   emb = [1,2,zu,1]
143   base_document = @base_class.new_document attributes: { 
embedded_item: emb }
144   expect(base_document.embedded_item).to eq emb
145   
146   base_document.update_embedded :embedded_item,  45
147   expect(base_document.embedded_item).to eq emb   45
148   
149   reloaded_document =  @r.get_document base_document.rid
150   expect(reloaded_document.embedded_item).to eq emb
151 
152 end

In short:  create a new document with an property »embedded_item« and 
assign the ruby-array 
   then check if the property is present in the created 
document (144)
   update_embedded (146) sends  update [base_document.rid] add 
embedded_item =  45 to the DB
  
 The test in 147 tests the presence of  45 in the ruby-array of the 
ruby-representation of the DB-Object.
 Then – reloading the Object..
 The DB-Document should be equal to the ruby-model, in particular the 
»embedded_item« property.
  but it fails:

   work with a schemaless approach (FAILED - 1)

Failures:

  1) REST::Model Operate with an embedded object work with a schemaless 
approach
 Failure/Error: expect(reloaded_document.embedded_item).to eq emb
   
   expected: [1, 2, zu, 1,  45]
got: [1, 2, zu, 1, 45]
 

The String  45 was converted into a Numeric, the string-properties are 
lost. 

Perhaps anybody can show me, how to insert the field as string  

Thanks in advance


hartmut





 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Backslashes in json

2015-06-17 Thread hartmut bischoff
Perhaps its the API.
https://github.com/topofocus/orientdb-rest   ist using the HTTP-REST 
interface mostly because the low-level binary driver is subject to many 
(and worst undocumentated and not properly communicated) changes.
The highl-level REST-Interface looks stable to me.

If you can manage to install ruby 2.x (rvm is not easily installed on 
openSuse) perhaps you give the ruby-driver a try.  The test is included in 
the test-suite there. Just install RSpec and run the tests.
Its  far from complete but does his job perfectly even in production here.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Backslashes in json

2015-06-16 Thread hartmut bischoff
tried to verify your problem

wrote the following [quickdirty] test (in my ruby-parser)


180 it update strange text, focus:true do
181   strange_text = { strange_text: '@type':'d','a':'some \\ text'}
182 
183   res=  @r.create_or_update_document o_class: @rest_class , set: { 
a_new_property: 36 } , where: {con_id: 346, symbol: 'EWQrGZ' } do
184   strange_text   #  - strange text is inserted into the 
database
185   end
   ## res is the response from the database 
186   expect( res.strange_text ).to eq strange_text[:strange_text]
   ## lets be shure, reload the document by using the rid 
187   document_from_db =  @r.get_document res.rid
   ## and perform the test once more
188   expect( document_from_db.strange_text ).to eq 
strange_text[:strange_text]
189 end

14:35:51 - INFO - Running: spec/lib/rest_spec.rb
Run options: include {:focus=true}

REST::OrientDB
  document-handling
D, [2015-06-16T14:35:53.037385 #89231] DEBUG -- REST::Base#initialize: 
property a_new_property assigned to REST::Model::Documebntklasse10
D, [2015-06-16T14:35:53.037697 #89231] DEBUG -- REST::Base#initialize: 
property con_id assigned to REST::Model::Documebntklasse10
D, [2015-06-16T14:35:53.037967 #89231] DEBUG -- REST::Base#initialize: 
property symbol assigned to REST::Model::Documebntklasse10
D, [2015-06-16T14:35:53.038185 #89231] DEBUG -- REST::Base#initialize: 
property strange_text assigned to REST::Model::Documebntklasse10
update strange text

Finished in 1.21 seconds (files took 0.34114 seconds to load)
1 example, 0 failures


Anything works fine.

Thus – your programming environment is not setup correctly

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: HTTP-PUT on index - strange behaviour

2015-06-12 Thread hartmut bischoff

Hi,

don't know which language you use.

Did some development with the REST-HTTP-Api using ruby recently ( 
 https://github.com/topofocus/orientdb-rest )

Update...upsert did not work  and due to the lack of documentation, I 
realized a much more comfortable solution.
Instead of responding to an DB-Error,  I always query for a document first.
If this exists, I use the quick  document_uri.patch api-call for an 
update.
Otherwise a document has to be inserted, which is time-consuming AND often 
requires more actions.

In ruby, you can provide a Block, which is executed only if an insert takes 
place.

I would write your term  as

 ror =  RestORiendb-Database
 ror.create_or_update_document o_class: 'IP' , where: { address: 
'10.10.1.1' }, set: { test: test2} 
 
 First a simple query containing  the where part only  is fired, 
 /query/{database}/sql/select from IP where address='10.10.1.1'/-1 (get)
 if a document is returned, its updated via document.patch, 
 /document/{database}/{rid} (patch)  attributes_to_json'
otherwise the complete dataset is inserted.
 
My solution provides three arguments: one for the determination if a 
document is present, then one for a quick-update and at last an optional 
block for a complete insert.
In ruby one can write:
 ror.create_or_update_document( 
   o_class: 'IP' , 
   where: { address: '10.10.1.1' }, 
   set: { test: test2}) do  
{ :used_for = Secret project, assigned_to: Mr. Fu}  # block 
provides a simple hash
 end


perhaps this helps you to clear your mind.

hartmut
  

 
 
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: A Hint for the IN-Operator needed

2015-06-12 Thread hartmut bischoff


On Thursday, June 11, 2015 at 3:32:35 PM UTC+2, alessand...@gmail.com wrote:


 In the field category 2 the are only the contracts from OpenInterest where 
 the fetch_date is 2015-06-02.

 Let me know if that is what you wanted.



 Hi, 
interesting: you came to the same solution, I figured out a few days ago. 
Problem is:  After carefully crosschecking I found, that just the content 
of the Object  Industries.categories is returned. 
In a database with joins, you alway got has many and belongs to. The 
one-way-graph defines only »has many«.
Lesson learned:
if you start at the top, you only get the »precision« of the TOP-Level. – 
unless you narrow your query by defining subqueries as demonstrated in the 
time-series-workout. 
So you need to reference the (sub-)results of the sub-queries, which 
provide a better precision.

To be specific: the query you (and I) build, queries only 

select name, categories.name, categories.subcategories.contracts.symbol 
   from Industries  where categories  =  {specific category)

The contents of subcategories and contracts are uniform and not dependent 
on the set of contents used in the most inner subquery.
Which is consistent with the OO-architecture of the document-db.

I learned a lot about the database – about its document-part, its 
OO-behavior and structural limits.

If the documentation would be complete, one might figure out, how the 
results of the sub-queries can be linked together. UnionAll might already 
be the solution. But its behavior, its syntax are not documented at all.


-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Query multible Classes (was: A Hint for the IN-Operator needed)

2015-06-10 Thread hartmut bischoff
I tried to solve this using the batch-function.

In essence: One solution would to extract the results of the subqueries and 
put this together in one table
The subquery-results are accessible via this batch:

 13   let con = select expand( contracts )  from Openinterest; ,
 14   let sub = select from Subcategories where contracts in $con;,
 15   let cat = select from Categories where subcategories in $sub;,
 16   let ind = select from Industries where categories in $cat;,
 17   SELECT expand(unionall) FROM (SELECT unionall $cat, $con)

which is much more readable. ... but gives neither an Error nor a result



-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: A Hint for the IN-Operator needed

2015-06-10 Thread hartmut bischoff


On Wednesday, June 10, 2015 at 4:08:44 PM UTC+2, alessand...@gmail.com 
wrote:

 Hi,
 can you post your schema, because i don't sure if i have understand it 
 very well.

 Alessandro


Well, its easy
All Classes are Basic-Classes, without a Superclass. Execption Contracts, 
which is abstract and hat Stock, Forex, Future, Option as Childs

 Openinterest  has one property: Date, and a linklist named contracts 
(pointing to a List of Contracts) 
 Contract has a single Link to  SubCategory

 Industries: [name],  categories (linklist) -  Categories: [ name], 
 subcategories (linklist) - Subcategories: [name] contracts ( linklist ) 
- Contracts [symbol][..]
 
 adapted from the TimeSeries-UseCase of the documentation

In terms of a relational database  its 
Industries(1)-(n)Categories(1)-(n)Subcategories(1)-(n)Contracts(n)-(1)OpenInterest

The Query-Strategy is to start with a subset of Contracts and fetch the 
depending Subcategories, Categories and Industries simply by asking,which 
Industries are coverd by the set of contracts determined by OpenInterest.
It offers me the chance become familar to the database-philosophy...
But perhaps, there is a much simpler solution, too...



-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: A Hint for the IN-Operator needed

2015-06-09 Thread hartmut bischoff
Good morning from Stuttgart,

I went further and think, I got some of the principles of querying.

Let's extend the graph:

Openinterest : Date, Contracts-SubCategory

Industry-Category-SubCategory-Contract

Then

select name, categories.name, categories.subcategories.contracts.symbol 
   from Industries 
   where categories in( 
  select from Categories where subcategories IN 
(
 select  from Subcategories where 
contracts IN( 
select 
expand(contracts) 
  from 
Openinterest 
  
 where fetch_date = '2015-06-02' )

 ) 
   )

uses the contracts in Openinterest to build the following table:

name  categories   
categories2

Technology   [Software,Semiconductors,Computers]   
[[MSFT],[MU,QCOM,AMAT,INTC],[BBRY,AAPL]]
Basic Materials  [Mining,Iron/Steel,Chemicals] 
[[AA,ABX,FCX],[VALE,CLF],[BAS,DOW]]
(...)

Problem is: The Contracts displayed are all Contracts present in the Link 
Subcategory.contracts.
I am not even shure, if the Categories match the selection of OpenInterest 
of if all present Categories are queried.
But I want the Contracts from OpenInterest.

I know – I am still comparing to traditional databases. Orientdb claims to 
be as powerful als RDMS, therefor  my stupid mind has to adapt...

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Understanding the basic database types and how vertices and edges work

2015-06-08 Thread hartmut bischoff


On Monday, June 8, 2015 at 3:40:47 PM UTC+2, hartmut bischoff wrote:



 On Thursday, June 4, 2015 at 5:16:14 PM UTC+2, Luigi Dell'Aquila wrote:

 Hi Scott,

 document and graph database types are just a legacy setting, right now 
 this distinction does not make sense anymore.
 You can use a graph database as both a document and a graph one.
 Graph structures are based on document structures under the hood, so the 
 efficiency in the traversal is the same. You can also mix the two models if 
 you want.



 Does this include that 
 create vertex and insert into are the same  and that the post document 
 method on the REST-HTTP-API can be used to create vertexes ?



And another Question:
is delete document rid  (as provided by the HTTP-REST-API) identical to the 
sql-command delete edge rid ?

the documentation notes:
NOTE: Don't use SQL DELETE to remove Vertices or Edges but use the DELETE 
VERTEX and DELETE EDGE commands that assure the integrity of the graph.

Is this still valid?

In this case I could use the 

  


-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: Functions mostly broken in 2.1-rc3 ?

2015-06-04 Thread hartmut bischoff




On Thursday, June 4, 2015 at 10:38:48 PM UTC+2, l.garulli wrote:

 Hi Hartmut,
 Where did you find the return getDatabase() ... ?

 http://orientdb.com/docs/2.0/orientdb.wiki/Functions.html
Execute a query

Query is an idempotent command. To execute a query use the query()method. 
Example:

return orient.getDatabase().query(select name from ouser);

Execute a command

Commands can be written in any language supported by JVM. By default 
OrientDB supports SQL and Javascript.

SQL Command

var gdb = orient.getGraph();
var results = gdb.command( sql, select from Employee where company = 
?, [ Orient Technologies ] );

This might make sense to experienced bodies, for somebody less familar with 
Orientdb and its diverse API's its confusing.
So I just followed the »instructions«  – the outcome is partly documentated 
in this thread.



 

 I don't understand where is the problem. Please could you elaborate it 
 more?

 Best Regards,

 Luca Garulli
 CEO at Orient Technologies LTD
 the Company behind OrientDB http://orientdb.com

 On 4 June 2015 at 21:59, hartmut bischoff topo...@gmail.com javascript:
  wrote:

 The documentation is a nightmare.

 http://orientdb.com/docs/last/SQL-Create-Function.html

 seems to be the acutal documentation 

 The command Create Function is accepted,  and  inserts a function into 
 the OFunctions Class.
 Surprisingly in Studio this function is marked as SQL  (capital).

 No need to reference the Database, just added the plain query   and 
 anything works.

 Perhaps someone can delete the part of the documentation  where  return 
 getDatabase() ... is used, which  points in the very wrong direction  ...


  -- 

 --- 
 You received this message because you are subscribed to the Google Groups 
 OrientDB group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to orient-databa...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.




-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Functions mostly broken in 2.1-rc3 ?

2015-06-04 Thread hartmut bischoff
The documentation is a nightmare.

http://orientdb.com/docs/last/SQL-Create-Function.html

seems to be the acutal documentation 

The command Create Function is accepted,  and  inserts a function into 
the OFunctions Class.
Surprisingly in Studio this function is marked as SQL  (capital).

No need to reference the Database, just added the plain query   and 
anything works.

Perhaps someone can delete the part of the documentation  where  return 
getDatabase() ... is used, which  points in the very wrong direction  ...


-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Functions mostly broken in 2.1-rc3 ?

2015-06-03 Thread hartmut bischoff
Hi alltogether,

is the feature of storing Funtions in the Database still usable?

I followed documentation and got completely lost.

First: I fired a simple SQL-Query

Schema:  contracts [n-link-1] subcategories  [n-link-1] categories 
[n-link-1] industries

To query all contracts belonging to a single industry, (just as in a 
oldschool-sql-db) one can write

 select name categories.subcategories.contracts from Industries  where name 
containstext   'ial'

which obviously returns an Array : 

#REST::Model::Myquery:0x0003ffb880 @attributes={ name =Basic 
Materials, categories=[[#21:1]], version=0, cluster=-2, 
record=0, fieldTypes=null=e, created_at=2015-06-02 14:11:46 
+0200, updated_at=2015-06-02 14:11:46 +0200}
#REST::Model::Myquery:0x0003ff9b20 @attributes={name=Financial, 
categories=[[#21:2]], version=0, cluster=-2, record=1, 
fieldTypes=null=e, created_at=2015-06-02 14:11:46 +0200, 
updated_at=2015-06-02 14:11:46 +0200}
#REST::Model::Myquery:0x0003ff83b0 @attributes={name=Industrial, 
categories=[[#23:0, #23:1]], version=0, cluster=-2, 
record=2, fieldTypes=null=e, created_at=2015-06-02 14:11:46 
+0200, updated_at=2015-06-02 14:11:46 +0200}

So far, so good – the query is working perfect.

Then I put the same query into a function:
( in Studio: )
return orient.getDatabase().query(select name, 
categories.subcategories.contracts from Industries  where name containstext 
'ial');
and saved it as »getContracts«

But when I tried to fetch the result via REST I got:

uri: function/hc_database/getContracts
{result:[{@type:d,@version:0,value:orient.getDatabase().query(\select
 
name, categories.subcategories.contracts from Industries  where name 
containstext 'ial'\)}]}

just the copy of the query-text


It turned better.

I switched to javascript:

var gdb = orient.getDatabase();

return gdb.command( sql, select name 

--- code: 400,
reason: Bad request,
content: Error on parsing script at position #0: Error on 
execution of the script\nScript: 
allCategories\n--^\nsun.org.mozilla.javascript.WrappedException: 
Wrapped 
com.orientechnologies.orient.core.exception.OConfigurationException: No 
database instance found in context (Unknown source#10) in Unknown 
source at line number 10\nWrapped 
com.orientechnologies.orient.core.exception.OConfigurationException: No 
database instance found in context (Unknown source#10)\nNo database 
instance found in context

Ups.

As only solution which works, I found 

language: Javascript
Database-Instance by getGraphNoTx()

To me the consequences of using getGraphNoTx are not clear. The strange 
behavior of the function-part should be noted as big bug in the 
development-Version .
strange. 


(I am using the current stable 2.0 Version of OrientDB)

Hartmut

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Are Linkset's -entries robust?

2015-06-03 Thread hartmut bischoff
Hi altogether,

I just discovered that its very easy to populate a linkset just by 
assigning an array of Record (or Vertex)-Links to it.

Unfortunatly I don't know enough java - 

In ruby, hashes and arrays are robust ie:  

a=  Array.new
a  9 
a  3
a  'z'

gives always [9,3,'z'], thus an explizit index can be avoided if no 
array-transformation is performed.

If I store a list of  RID's to the Database, and later retrieve the hole 
document, is the sequence of array-elements always maintained 

or do I have to use a separate Index-field? 




-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Are Linkset's -entries robust?

2015-06-03 Thread hartmut bischoff

On Wednesday, June 3, 2015 at 5:12:24 PM UTC+2, Emanuele wrote:

  In case of LINKLIST the order is maintened, the LINKSET not maintain the 
 order.


Thanks,

I just checked ... It loads an Array of RID-items and returns the same. 
Perfect   

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Functions mostly broken in 2.1-rc3 ?

2015-06-03 Thread hartmut bischoff


On Thursday, June 4, 2015 at 12:15:11 AM UTC+2, Ziink A wrote:

 I'm not certain but I think there's a bug in Studio that is causing an 
 error with orient.getDatabase()


 This is what I thought first, too.
Then I tested the feature with the HTTP/REST-API  --- same result – even if 
I change getDatabase to getGraphNoTx, which worked for me in one single 
case:

uri:function/hc_database/myTest
{result=[{@type=d, @version=0, 
value=orient.getGraphNoTx().command('sql',\select name, 
categories.subcategories.contracts from Industries where name containstext 
'ial'\ )}]}
---



 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Ruby-REST-Adapter

2015-05-27 Thread hartmut bischoff
Hi everybody,

the nature and status of OrientDB prevents from an evolution of a stable 
binary database-adapter.
There are some projects on GitHub, they are far from a 
»production-ready«-status.

On the other hand – the REST-HTTP-API seem to be robust – and it's easy to 
address it with ruby.

I created a small wrapper which opens the data-door  from Ruby to OrientDB.

https://github.com/topofocus/orientdb-rest

The next step is to map OrientDB-Objects as Active-Model-Ruby-Objects, 
which can be a start to realize rails-like-behavior.

Suggestions are welcome

hartmut

-- 

--- 
You received this message because you are subscribed to the Google Groups 
OrientDB group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.