Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support for Blob Constant #133

Closed
tharigopl opened this Issue · 3 comments

3 participants

@tharigopl

I cannot find support for the hexadecimal blob constants datatype defined by 0xX+ where hex is an hexadecimal character. Is there any generator like GUID generator. I wrote my own BlobConstant generator for my project. Just wanted to know if FluentCassandra has it.

@nberardi
Owner
@tharigopl

Sure. Will complete it.

@Aaronontheweb Aaronontheweb referenced this issue from a commit in Aaronontheweb/fluentcassandra
@Aaronontheweb Aaronontheweb added support for blob constant when working with binary data in CQL3…
…. close #133
0e695d6
@Aaronontheweb Aaronontheweb closed this in #146
@Aaronontheweb

@tharigopl the code used for adding the appropriate blob constants in CQL3 can be found in the CqlHelper class. From the CqlHelperTest:

        [Fact]
        public void EscapeBytesForCqlTest()
        {
            //arrange
            var bytes = Encoding.UTF8.GetBytes("hello world");
            var expectedHex = "0x68656c6c6f20776f726c64"; //generated via the textAsBlob function in CQL3 shell

            //act
            var hex = CqlHelper.EscapeForCql(bytes);

            //assert
            Assert.Equal(expectedHex, hex);
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.