Streams

    Supported stream method now available in the SDK are:

    • StreamSet
    • StreamGet
    • StreamVerifiedSet
    • StreamVerifiedGet
    • StreamScan
    • StreamZScan
    • StreamHistory
    • StreamExecAll

    Here an example on how to send a large file and a regular key value to immudb.

    It’s possible to specify the chunk size of the stream with WithStreamChunkSize() method.

    Streams is not supported yet in this language SDK. Do you want to make a feature request or help out? Open an issue on Java sdk github project (opens new window)

    Streams is not supported yet in this language SDK. Do you want to make a feature request or help out? Open an issue on

    Streams is not supported yet in this language SDK. Do you want to make a feature request or help out? Open an issue on .Net sdk github project (opens new window)

    If you’re using another development language, please read up on our option.

    It’s possible to read returned value chunk by chunk if needed. This grant to the clients capabilities to handle data coming from immudb chunk by chunk

    To read chunk by chunk the inner gRPC protobuffer client is needed. Then it’s possible to use kvStreamReceiver to retrieve the key and a value reader. Such reader will fill provided byte array with received data and will return the number of read bytes or error. If no message is present it returns 0 and io.EOF. If the message is complete it returns 0 and nil, in that case successive calls to Read will returns a new message.

    1. sc := client.GetServiceClient()
    2. if err != nil {
    3. log.Fatal(err)
    4. }
    5. key, vr, err := kvr.Next()
    6. if err != nil {
    7. log.Fatal(err)
    8. }
    9. fmt.Printf("read %s key", key)
    10. chunk := make([]byte, 4096)
    11. l, err := vr.Read(chunk)
    12. if err != nil && err != io.EOF {
    13. log.Fatal(err)
    14. }
    15. if err == io.EOF {
    16. break
    17. }
    18. fmt.Printf("read %d byte\n", l)

    Streams is not supported yet in this language SDK. Do you want to make a feature request or help out? Open an issue on Java sdk github project (opens new window)

    Streams is not supported yet in this language SDK. Do you want to make a feature request or help out? Open an issue on

    Streams is not supported yet in this language SDK. Do you want to make a feature request or help out? Open an issue on Node.js sdk github project (opens new window)

    Streams is not supported yet in this language SDK. Do you want to make a feature request or help out? Open an issue on

    If you’re using another development language, please read up on our immugw (opens new window) option.