put

Put entries in both local and remote regions. The Orders region has key & value constraints: data.OrderKey and data.Order respectively. These Key and Value classes should be set using Key and Value commands as shown in the examples. The put command as shown below can be used to specify every field for the key and object value. Note that the syntax here is: put (fields for key objects, fields for value objects)

o


gfsh:/Orders>put (Id='1' and CustProdId='CUST96874_HSHD101', Id='1' and CustomerId='CUST96874' and ProductId='HSHD101' and Time=to_date('04/10/2009', 'MM/dd/yyyy') and Quantity=1 and Discount=0.5d)
	
Row  Id  CustProdId        | Id  Time                          Quantity  ProductId  CustomerId  Discount
---  --  ----------        | --  ----                          --------  ---------  ----------  --------
1    1   CUST96874_HSHD101 | 1   Fri Apr 10 00:00:00 IST 2009  1         HSHD101    CUST96874   0.5
	
	  Key Class: data.OrderKey
Value Class: data.Order
		

Customers region has key & value constraints java.lang.String & data.Order respectively. These Key & Value classes should be set using key & value commands as shown in respective examples.

gfsh:/Customers>put ('CUST94651', Id='CUST94651' and Name='Danica P' and Address='New Jersey')

Row  Key       | Address     Name      Id
---  ---       | -------     ----      --
1    CUST94651 | New Jersey  Danica P  CUST94651
	
	  Key Class: java.lang.String
Value Class: data.Customer

gfsh:/Customers>select * from /Customers

Row  Address     Name        Id
---  -------     ----        --
1    Tokyo       Yuki T      CUST34571
2    Oviedo      Fernando A  CUST13541
3    Delhi       V Ahmad     CUST17891
4    Pune        Vishal R    CUST10401
5    Karpen      Michael S   CUST96874
6    New Jersey  Danica P    CUST94651

Class: data.Customer
Fetch size: 50, Limit: 1000
Results: 6, Returned: 6/6
elapsed (msec): 4