Giter VIP home page Giter VIP logo

Comments (6)

 avatar commented on July 30, 2024

Good question. I hid away the NullType that is being returned, but maybe I should make it public so that you can check the type being returned. Do you have a way you would like to work with a non-existant column?

from fluentcassandra.

robinsu avatar robinsu commented on July 30, 2024

there are two options which our wish.

  1. provide one method function to check the column is existing or not.
  2. support using .Net generic Nullable<> Type.

we are very appreciate to your great help and valuable support.
Thank you very much,

from fluentcassandra.

nberardi avatar nberardi commented on July 30, 2024

Sorry this has taken so long, but I have finally found some time to add the feature you requested.

http://github.com/managedfusion/fluentcassandra/commit/3cf99745f37951d4003486f2c07d78a252adf26e

Now you will be able to use the method

if (ColumnExists("ColumnName"))

And you can now cast to Nullable types if and when supported by the underlying Cassandra type.

Let me know if this solves you issue.

from fluentcassandra.

robinsu avatar robinsu commented on July 30, 2024

Thank you so much !!

from fluentcassandra.

timoaho avatar timoaho commented on July 30, 2024

I have the same problem as the original poster.

The method public virtual bool FluentRecord.FluentCassandra.ColumnExists(string name) seems to have been removed from FluentRecord.cs in the following commit:
1b28998#src/FluentRecord.cs

I could not find the functionality anywhere else. Do I miss something?

from fluentcassandra.

nberardi avatar nberardi commented on July 30, 2024

The method had a number of problems. Because column names can be any of the types not just string. And it didn't work so well for dynamic types. So dynamic properties will just return null if it isn't present.

However I may have overlooked the POCO users of this object. If you are interested I would be interested in taking in a pull request to support this for POCO uses.

Here you can sort of see how I am comparing column names.

https://github.com/managedfusion/fluentcassandra/blob/master/src/FluentColumnFamily.cs#L170

However instead of object you would want to use CassandraObject.

from fluentcassandra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.