shuxinqin / Chloe

A lightweight and high-performance Object/Relational Mapping(ORM) library for .NET --C#
https://github.com/shuxinqin/Chloe/wiki
MIT License
1.52k stars 455 forks source link

sharding下如果是contains的情况下是否走的equal但是各个表应该是or吧这种情况怎么办 #316

Closed xuejmnet closed 2 years ago

xuejmnet commented 2 years ago

ids.contains(o.id)

shuxinqin commented 2 years ago

我是根据遍历ids里每个id,通过ShardingOperator.Equal计算所在的表,然后union结果就是ids所定位到的表集合。 https://github.com/shuxinqin/Chloe/blob/master/src/Chloe/Sharding/Visitors/ShardingTableDiscoverer.cs#L241

xuejmnet commented 2 years ago

谢谢学习了