Question

I have to save the compiled expression from MVel in database. So that I can use this directly to evaluate the expression. How can I do that.

Était-ce utile?

La solution

All compiled expressions are serializable, and thus can be saved as blobs.

Autres conseils

Wouldn't it make more sense to store it in its external source form? Parsing and construction is unlikely to be much overhead, if you already have to do database access which is much much slower.

Storing source is readable, and it may well be more compact -- binary serialization format may or may not be compact. Default JDK serialization, for example, is very verbose since it includes lots of Java class metadata.

So are you sure there is actual benefit from storing binary representations.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top