Coder Social home page Coder Social logo

kits's People

Contributors

diffoz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kits's Issues

Saving Items as byte array was a bad idea

Many users report that saving a INSERT query with an external program (e.g. HeidiSQL) can cause a broken Items byte array:

[04:00:52 ERR][Microsoft.EntityFrameworkCore.Query] An exception occurred while iterating over the results of a query for context type 'Kits.Databases.Mysql.KitsDbContext'.
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
  at System.IO.BinaryReader.ReadByte () [0x00018] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.IO.BinaryReader.Read7BitEncodedInt () [0x00019] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.IO.BinaryReader.ReadString () [0x0000f] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at Kits.API.KitItem.Deserialize (System.IO.BinaryReader br) [0x00000] in <b408e3839c8d44bc9b2d7caa48eb86b2>:0 
  at Kits.Extensions.ConvertorExtension.ConvertToKitItems (System.Byte[] block) [0x00034] in <b408e3839c8d44bc9b2d7caa48eb86b2>:0 
  at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,Microsoft.EntityFrameworkCore.Query.QueryContext,System.Data.Common.DbDataReader,Microsoft.EntityFrameworkCore.Query.Internal.ResultContext,int[],Microsoft.EntityFrameworkCore.Query.Internal.ResultCoordinator)
  at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1+AsyncEnumerator+<MoveNextAsync>d__17[T].MoveNext () [0x001ce] in <04749dad1c80429287c0de883da70092>:0

So, I'm thinking to rewrite it to use one of two options:

  • Saving Items as Json column (best for users experience)
  • Saving Items to another table with FK of Id

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.