Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
ebba922
set ConfigureAwait(false) for async calls
stephenatsembit Jan 22, 2025
27e0cc1
refactor command options, refactor naming, solidify sync/async method…
stephenatsembit Jan 28, 2025
012d71e
add sample appsettings file, remove test file
stephenatsembit Jan 28, 2025
7ad7210
remove bin and obj folders, move defaults to proper end of commandopt…
stephenatsembit Jan 30, 2025
37475b1
add unittest bin/obj, and appsettings to ignore
stephenatsembit Jan 30, 2025
5da9ccc
runnable state (renaming and test tweaks)
jeffrey-elliott Jan 31, 2025
6e14fe9
rename, .gitignore, DbId for admin tests
jeffrey-elliott Jan 31, 2025
01cd335
Merge pull request #1 from stephenatsembit/db_admin
a-random-steve Feb 1, 2025
4a09303
added ListDatabases, ListDatabasesNames and tests
jeffrey-elliott Feb 1, 2025
0044e28
turn off implicit usings to make .net462 happy
stephenatsembit Feb 1, 2025
c84088e
Merge pull request #2 from stephenatsembit/db_admin
a-random-steve Feb 1, 2025
23e7e3a
added DoesDatabaseExist by string and by guid
jeffrey-elliott Feb 6, 2025
114a373
Merge pull request #3 from stephenatsembit/db_admin
a-random-steve Feb 7, 2025
6c9e310
formatting
stephenatsembit Feb 7, 2025
6cb1cb4
todo for integration test to check for existence by name
stephenatsembit Feb 7, 2025
b4233e9
utilizing CommandOptions to affect the http calls, adding methods to …
stephenatsembit Feb 12, 2025
ae9082c
added create, drop; consistent naming
jeffrey-elliott Feb 12, 2025
de696d1
refs and formatting
jeffrey-elliott Feb 12, 2025
76d117a
spacing
jeffrey-elliott Feb 12, 2025
3f4b528
move test db name into config
stephenatsembit Feb 13, 2025
4d8614d
handle sync waitfordatabase
stephenatsembit Feb 13, 2025
0ce4e10
cleanup async methods
stephenatsembit Feb 13, 2025
d2526fa
refs and spacing
jeffrey-elliott Feb 13, 2025
ec11ccf
async delagte for CreateDatabase
jeffrey-elliott Feb 14, 2025
c775326
added DatabaseCreationOptions
jeffrey-elliott Feb 14, 2025
3024e03
remove t/s code
jeffrey-elliott Feb 14, 2025
4bd98d0
added CommandOptions
jeffrey-elliott Feb 14, 2025
d187fc1
finish handling of keyspace for database, naming adjustments
stephenatsembit Feb 17, 2025
d102ea2
Merge pull request #5 from stephenatsembit/database-admin
a-random-steve Feb 17, 2025
42e26c5
Merge commit '2334bb53b9027422e19c36f2165408c636ddc279'
stephenatsembit Feb 17, 2025
e05da62
fix merge errors
stephenatsembit Feb 17, 2025
4721ae1
additional merge issues
stephenatsembit Feb 17, 2025
3456673
beginnings of insert many
stephenatsembit Feb 20, 2025
de1ab3b
Merge branch 'collections-inserts' into collection-insert-many
stephenatsembit Feb 21, 2025
46cf764
fix merge issue
stephenatsembit Feb 21, 2025
dbb9cf6
collection.InsertMany, and initial FindOne and FindMany implementations
stephenatsembit Mar 5, 2025
ec14f98
FindOne fixes
stephenatsembit Mar 5, 2025
c211213
finish initial draft of querying single and multiple documents
stephenatsembit Mar 24, 2025
c27bf7a
Merge pull request #6 from stephenatsembit/collection-insert-many
a-random-steve Mar 24, 2025
1171300
Merge branch 'datastax:main' into main
a-random-steve Mar 24, 2025
f69bae3
DatabaseAdminAstra; tests and changes for AdminAstraDatabasesAdmin
jeffrey-elliott Mar 28, 2025
dbad808
added copyright block
jeffrey-elliott Mar 28, 2025
c2afae4
finish replace and delete
stephenatsembit Mar 28, 2025
b8aa936
misc serialization fixes, refactor findmany
stephenatsembit Mar 31, 2025
92fab72
Merge pull request #7 from stephenatsembit/admin-ltip
a-random-steve Mar 31, 2025
e013599
Merge commit '92fab728629bec78c3367bdb29d65917fa65a8a7' into collecti…
stephenatsembit Mar 31, 2025
bc3a2c7
adjust keyspace test
stephenatsembit Apr 1, 2025
b9b104f
Merge pull request #8 from stephenatsembit/collection-update
a-random-steve Apr 1, 2025
d4c0371
cleanup and add tests for distinct
stephenatsembit Apr 1, 2025
3b2ab82
Merge pull request #9 from stephenatsembit/collection-update
a-random-steve Apr 1, 2025
cfe16d7
Merge branch 'datastax:main' into main
a-random-steve Apr 10, 2025
f5bacde
initial documentation setup
stephenatsembit Apr 2, 2025
5f12dc6
doc testing
stephenatsembit Apr 2, 2025
c3ee6ea
adding client documentation as well as a few additional overloads
stephenatsembit Apr 2, 2025
cb797f7
finalized admin docfx comments
jeffrey-elliott Apr 3, 2025
2ee4f63
documentation and cleanup
stephenatsembit Apr 9, 2025
536ae5c
wrap examples with code element
stephenatsembit Apr 9, 2025
d665553
Merge branch 'datastax:main' into main
a-random-steve Apr 11, 2025
2528909
fix logo in documentation to work for light and dark mode
stephenatsembit Apr 11, 2025
c7aace8
added elements for nuget package
jeffrey-elliott Apr 11, 2025
c5f23f0
Merge pull request #10 from a-random-steve/adding-nuget
a-random-steve Apr 11, 2025
a42c6af
add copyright
stephenatsembit Apr 11, 2025
148b59c
update description, remove product
stephenatsembit Apr 11, 2025
8ebce2f
fix bug where deserialization of typed object doesn't account for jso…
stephenatsembit Apr 18, 2025
87b0b0b
update readme path for nuget
stephenatsembit Apr 28, 2025
c1b07f5
default id fixes (when creating collection from a strongly-typed obje…
stephenatsembit Apr 29, 2025
a764509
Merge branch 'upstream-main'
stephenatsembit Apr 29, 2025
d602ed0
fixes for null DocumentId properties
stephenatsembit Apr 29, 2025
e2f069e
Merge branch 'datastax:main' into main
a-random-steve Apr 29, 2025
ca54836
adding table functionality
stephenatsembit Apr 25, 2025
223f19b
added listing and creating indexes on tables
jeffrey-elliott May 7, 2025
a58f9e6
table find, insert, delete
stephenatsembit May 8, 2025
fa8c89d
create index mods after merge
stephenatsembit May 8, 2025
7f54f18
added alter table operations
jeffrey-elliott May 15, 2025
4b0a622
Merge pull request #11 from a-random-steve/alter-table
a-random-steve May 19, 2025
6f29963
misc fixes for tables as well as some collection deserialization fixe…
stephenatsembit May 19, 2025
8ec93d6
finish functionality for beta release of tables functionality
stephenatsembit May 20, 2025
390919c
cleanup and fixes
stephenatsembit May 22, 2025
e8161b0
Merge branch 'datastax:main' into main
a-random-steve May 22, 2025
3710f47
Merge branch 'main' into tables
stephenatsembit May 22, 2025
03a0860
Remove ability to get database by id, add waitForCompletion option to…
stephenatsembit Jun 13, 2025
9b92bc0
update admin test
stephenatsembit Jun 13, 2025
f90ddb9
Finish draft of hybrid search, improvements to find enumerators, upda…
stephenatsembit Jun 24, 2025
b014ff3
remove test run files
stephenatsembit Jun 24, 2025
3aa1a41
add upgrade info to readme
stephenatsembit Jun 24, 2025
a3011db
initial github action
stephenatsembit Jun 24, 2025
2b8dece
update build path
stephenatsembit Jun 24, 2025
a2f66ec
update build path
stephenatsembit Jun 24, 2025
8154a68
fix build path
stephenatsembit Jun 24, 2025
3a44bc1
add dry run release ci
stephenatsembit Jun 24, 2025
9cc4de1
fix yaml syntax
stephenatsembit Jun 24, 2025
29953ff
change tag processing
stephenatsembit Jun 24, 2025
4fa38d3
Update release.yml
a-random-steve Jun 24, 2025
43849e5
remove version from csproj as it will be passed in by the ci/cd action
stephenatsembit Jun 24, 2025
6596132
cleanup
stephenatsembit Jun 25, 2025
4737e60
updated databaseinfo objects
stephenatsembit Jun 25, 2025
78aeaa9
Merge branch 'upstream-main'
stephenatsembit Jun 25, 2025
69cfc64
merge cleanup
stephenatsembit Jun 25, 2025
b3f12cc
Merge branch 'main' into client-team-feedback
stephenatsembit Jun 25, 2025
b739299
remove DeleteAll, simplify DatabaseInfo, add missing property to Vect…
stephenatsembit Jun 26, 2025
5085fb5
handle multiple types and levels of timeouts, fixes for untyped tables
stephenatsembit Jul 1, 2025
de0becd
code cleanup and refactoring
stephenatsembit Jul 1, 2025
03571e9
refactor integration tests, fix database creation options
stephenatsembit Jul 3, 2025
d1e0788
Merge branch 'datastax:main' into main
a-random-steve Jul 8, 2025
5c58942
Merge commit 'd1e078886a1a0fd84f6e68770e89c416bf663fe9' into client-t…
stephenatsembit Jul 8, 2025
fe18671
remove dry run for automated nuget build
stephenatsembit Jul 8, 2025
6a3b9ee
changes based on feedback during documentation
stephenatsembit Sep 16, 2025
336d426
additional cleanup and hardening per documentation feedback
stephenatsembit Sep 17, 2025
46beeef
limit parallelization on tests (to avoid limits)
stephenatsembit Sep 17, 2025
941a680
Merge branch 'main' into documentation-feedback
amorton Oct 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DataStax.AstraDB.DataApi/Core/Commands/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ private async Task<T> RunCommandAsync<T>(HttpMethod method, bool runSynchronousl
responseContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
MaybeLogDebugMessage("Response Status Code: {StatusCode}", response.StatusCode);
MaybeLogDebugMessage("Content: {Content}", responseContent);
throw new HttpRequestException($"Request to failed with status code {response.StatusCode}.");
throw new HttpRequestException($"Request failed with status code {response.StatusCode}.");
}
}
responseContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
Expand Down
10 changes: 5 additions & 5 deletions src/DataStax.AstraDB.DataApi/Core/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ private async Task<IEnumerable<TableInfo>> ListTablesAsync(DatabaseCommandOption
/// Synchronous version of <see cref="ListTableNamesAsync()"/>
/// </summary>
/// <returns></returns>
public IEnumerable<string> ListTableNames()
public List<string> ListTableNames()
{
return ListTableNames(null);
}
Expand All @@ -915,7 +915,7 @@ public IEnumerable<string> ListTableNames()
/// </summary>
/// <param name="options">The options to use for the command, useful for overriding the keyspace, for example.</param>
/// <returns></returns>
public IEnumerable<string> ListTableNames(DatabaseCommandOptions options)
public List<string> ListTableNames(DatabaseCommandOptions options)
{
return ListTableNamesAsync(options, true, true).ResultSync();
}
Expand All @@ -924,7 +924,7 @@ public IEnumerable<string> ListTableNames(DatabaseCommandOptions options)
/// List the tables in the database.
/// </summary>
/// <returns></returns>
public Task<IEnumerable<string>> ListTableNamesAsync()
public Task<List<string>> ListTableNamesAsync()
{
return ListTableNamesAsync(null);
}
Expand All @@ -934,12 +934,12 @@ public Task<IEnumerable<string>> ListTableNamesAsync()
/// </summary>
/// <param name="options">The options to use for the command, useful for overriding the keyspace, for example.</param>
/// <returns></returns>
public Task<IEnumerable<string>> ListTableNamesAsync(DatabaseCommandOptions options)
public Task<List<string>> ListTableNamesAsync(DatabaseCommandOptions options)
{
return ListTableNamesAsync(options, true, false);
}

private async Task<IEnumerable<string>> ListTableNamesAsync(DatabaseCommandOptions options, bool includeDetails, bool runSynchronously)
private async Task<List<string>> ListTableNamesAsync(DatabaseCommandOptions options, bool includeDetails, bool runSynchronously)
{
var payload = new
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ namespace DataStax.AstraDB.DataApi.Core.Query;

public class DocumentFindOptions<T> : FindOptions<T, DocumentSortBuilder<T>>
{
/// <summary>
/// The sort to apply when running the query.
/// </summary>
[JsonIgnore]
public override DocumentSortBuilder<T> Sort { get; set; }

}
6 changes: 5 additions & 1 deletion src/DataStax.AstraDB.DataApi/Core/Query/FindOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public abstract class FindOptions<T, TSort> : IFindOptions<T, TSort> where TSort
[JsonIgnore]
public IProjectionBuilder Projection { get; set; }

internal bool? IncludeSimilarity { get; set; }
/// <summary>
/// Whether to include a similarity score in the results or not (when performing a vector sort).
/// </summary>
[JsonIgnore]
public bool? IncludeSimilarity { get; set; }

protected bool? _includeSortVector;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace DataStax.AstraDB.DataApi.Core.Results;
Expand All @@ -24,8 +25,8 @@ namespace DataStax.AstraDB.DataApi.Core.Results;
public class ListTableNamesResult
{
/// <summary>
/// An array of table names.
/// The list of table names.
/// </summary>
[JsonPropertyName("tables")]
public string[] Tables { get; set; }
public List<string> Tables { get; set; }
}
35 changes: 35 additions & 0 deletions src/DataStax.AstraDB.DataApi/Core/TableDeleteOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using DataStax.AstraDB.DataApi.Core.Query;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;

namespace DataStax.AstraDB.DataApi.Core;

/// <summary>
/// Options for deleting a row from a table
/// </summary>
/// <typeparam name="T"></typeparam>
public class TableDeleteOptions<T> where T : class
{
internal Filter<T> Filter { get; set; }

[JsonInclude]
[JsonPropertyName("filter")]
internal Dictionary<string, object> FilterMap => Filter == null ? new Dictionary<string, object>() : Filter.Serialize();
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageIcon>packageIcon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,33 @@
* limitations under the License.
*/

using DataStax.AstraDB.DataApi.Core.Results;
using DataStax.AstraDB.DataApi.Tables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
using DataStax.AstraDB.DataApi.Core.Results;
using DataStax.AstraDB.DataApi.Tables;

namespace DataStax.AstraDB.DataApi.SerDes;

public class TableInsertManyResultConverter : JsonConverter<TableInsertManyResult>
internal class TableInsertOneResultConverter : TableInsertResultConverter<TableInsertOneResult>
{
public override TableInsertManyResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
}

internal class TableInsertManyResultConverter : TableInsertResultConverter<TableInsertManyResult>
{
}

internal class TableInsertResultConverter<T> : JsonConverter<T> where T : TableInsertManyResult, new()
{

public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType != JsonTokenType.StartObject)
throw new JsonException("Expected StartObject token");

var result = new TableInsertManyResult();
var result = new T();
JsonDocument insertedIdsDoc = null;
JsonDocument documentResponsesDoc = null;

Expand Down Expand Up @@ -207,7 +216,7 @@ private object DeserializeValue(JsonElement element, PrimaryKeySchema schema, Js
}
}

public override void Write(Utf8JsonWriter writer, TableInsertManyResult value, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
{
throw new NotSupportedException("Serialization is not implemented for TableInsertManyResult");
}
Expand Down
Loading