Skip to content

Commit 3e3fe65

Browse files
author
MPCoreDeveloper
committed
Vector safe check in
1 parent 09429fe commit 3e3fe65

39 files changed

+3110
-125
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## General Guidelines
44
- Test programs should be located in the `tests` folder and not in the repository root.
5+
- All project documentation must be written in English. This includes docs, README files, technical specs, implementation plans, and code comments.
56

67
## Code Style
78
- Use specific formatting rules

SharpCoreDB.sln

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
Microsoft Visual Studio Solution File, Format Version 12.00
23
# Visual Studio Version 18
34
VisualStudioVersion = 18.1.11312.151
@@ -68,6 +69,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Snippets", "Snippets", "{53
6869
EndProject
6970
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RefFieldDemo", "tests\Manual\RefFieldDemo\RefFieldDemo.csproj", "{800EBE19-FE8B-EBD4-D5F7-AFB27C1755A0}"
7071
EndProject
72+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpCoreDB.VectorSearch", "src\SharpCoreDB.VectorSearch\SharpCoreDB.VectorSearch.csproj", "{5E39577A-E286-45E9-9801-E8DC8F81ED7D}"
73+
EndProject
7174
Global
7275
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7376
Debug|Any CPU = Debug|Any CPU
@@ -270,6 +273,18 @@ Global
270273
{800EBE19-FE8B-EBD4-D5F7-AFB27C1755A0}.Release|x64.Build.0 = Release|Any CPU
271274
{800EBE19-FE8B-EBD4-D5F7-AFB27C1755A0}.Release|x86.ActiveCfg = Release|Any CPU
272275
{800EBE19-FE8B-EBD4-D5F7-AFB27C1755A0}.Release|x86.Build.0 = Release|Any CPU
276+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
277+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
278+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Debug|x64.ActiveCfg = Debug|Any CPU
279+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Debug|x64.Build.0 = Debug|Any CPU
280+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Debug|x86.ActiveCfg = Debug|Any CPU
281+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Debug|x86.Build.0 = Debug|Any CPU
282+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
283+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Release|Any CPU.Build.0 = Release|Any CPU
284+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Release|x64.ActiveCfg = Release|Any CPU
285+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Release|x64.Build.0 = Release|Any CPU
286+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Release|x86.ActiveCfg = Release|Any CPU
287+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D}.Release|x86.Build.0 = Release|Any CPU
273288
EndGlobalSection
274289
GlobalSection(SolutionProperties) = preSolution
275290
HideSolutionNode = FALSE
@@ -297,6 +312,7 @@ Global
297312
{A0C49171-D013-CE79-41C2-2B01E3F6E0BF} = {F4AC329D-E0EF-4EC6-A21B-DD74A344A3A5}
298313
{53FBF8A2-0A92-44AD-9CD0-4FBDF7F62C9B} = {2F8A8533-DAA8-4CF9-A6C0-2F663AF7FD2E}
299314
{800EBE19-FE8B-EBD4-D5F7-AFB27C1755A0} = {A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}
315+
{5E39577A-E286-45E9-9801-E8DC8F81ED7D} = {F8B5E3A4-1C2D-4E5F-8B9A-1D2E3F4A5B6C}
300316
EndGlobalSection
301317
GlobalSection(ExtensibilityGlobals) = postSolution
302318
SolutionGuid = {F40825F5-26A1-4E85-9D0A-B0121A7ED5F8}

docs/CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,39 @@ All notable changes to SharpCoreDB will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.2.0] - Unreleased
9+
10+
### ✨ Added
11+
- **Vector Search Extension** (`SharpCoreDB.VectorSearch` NuGet package)
12+
- SIMD-accelerated distance metrics: cosine, Euclidean (L2), dot product
13+
- `System.Numerics.Vector<float>` auto-selects widest SIMD: AVX-512 → AVX2 → SSE2/NEON → scalar
14+
- HNSW approximate nearest neighbor index with configurable M, efConstruction, efSearch
15+
- Flat (brute-force) exact search index for small datasets or perfect recall
16+
- Binary format for vector serialization with magic bytes, version header, and zero-copy spans
17+
- Scalar quantization (float32 → uint8, 4× memory reduction)
18+
- Binary quantization (float32 → 1 bit, 32× memory reduction with Hamming distance)
19+
- HNSW graph persistence (serialize/deserialize for database restart)
20+
- Seven SQL functions: `vec_distance_cosine`, `vec_distance_l2`, `vec_distance_dot`, `vec_from_float32`, `vec_to_json`, `vec_normalize`, `vec_dimensions`
21+
- DI registration: `services.AddVectorSupport()` with configuration presets (Embedded, Standard, Enterprise)
22+
- Zero overhead when not registered — all vector support is 100% optional
23+
- **Core: Extension Provider System**
24+
- `ICustomFunctionProvider` interface for pluggable SQL functions
25+
- `ICustomTypeProvider` interface for pluggable data types
26+
- `DataType.Vector` enum value (stored as BLOB internally)
27+
- `VECTOR(N)` column type parsing in CREATE TABLE
28+
- `ColumnDefinition.Dimensions` for VECTOR(N) metadata
29+
- `ITable.Metadata` extensible key-value store for optional features
30+
- **DDL: Vector Index Management**
31+
- `CREATE VECTOR INDEX idx ON table(col) USING FLAT|HNSW`
32+
- `DROP VECTOR INDEX idx ON table`
33+
- Vector column type validation at index creation time
34+
35+
### 📊 Version Info
36+
- **Package Version**: 1.2.0
37+
- **New Package**: SharpCoreDB.VectorSearch 1.2.0
38+
- **Target Framework**: .NET 10 / C# 14
39+
- **Breaking Changes**: None — 100% backward compatible
40+
841
## [1.1.1] - 2026-02-08
942

1043
### 🐛 Fixed

0 commit comments

Comments
 (0)