Opened 7 years ago
Last modified 7 years ago
#1698 closed defect
RasdaPy_Support query with insert into values from file and mdddomain, mddtype — at Initial Version
Reported by: | Bang Pham Huu | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 9.5 |
Component: | rasdapy | Version: | development |
Keywords: | Cc: | Dimitar Misev | |
Complexity: | Medium |
Description
RasdaPy needs to support this type of query:
$RASQL -q "insert into $TEST_SUBSETTING_1D values decode(\$1)" -f "$TESTDATA_PATH/101.bin" --mdddomain "[0:100]" --mddtype GreyString > /dev/null
which in Python code, it creates a POST request like this to send to rasserver as in rasj via protobuf to import data from file into collection, e.g:
Command=11&ClientID=864741134&QueryString=insert into test_rasj values #MDD1#&Endianess=0&NumberOfQueryParameters=1&BinDataSize=67&BinData=\000\000\000\001GreyImage\000\000\000\000\000\001[0:3,0:3]\000[0:10,0:10]\000||0.0\000\000\000\000\020\000\001\002\003\004\005\006\a\b\t\n\v\f\r\016\017"
This key value is encoded in iso-8859-1 with the needed data: BinData=4bytes_int(1) + MDD_Type + "\0" + "\0" + 4bytes_int(length of base type (e.g: char) + MDD_Domain + "\0" + Tile_Domain + "\0" + "||0.0" + "\0" + 4bytes_int(length_of_binary_content_from_file).
Note:
See TracTickets
for help on using tickets.