@@ -1397,4 +1397,107 @@ describe("table Entity APIs test - using Azure/data-tables", () => {
13971397
13981398 await tableClient . deleteTable ( ) ;
13991399 } ) ;
1400+
1401+ it ( "23. should find the correct long int, @loki" , async ( ) => {
1402+ const tableClient = createAzureDataTablesClient (
1403+ testLocalAzuriteInstance ,
1404+ getUniqueName ( "longint" )
1405+ ) ;
1406+ const partitionKey = createUniquePartitionKey ( "" ) ;
1407+ const testEntity : TableTestEntity =
1408+ entityFactory . createBasicEntityForTest ( partitionKey ) ;
1409+
1410+ await tableClient . createTable ( { requestOptions : { timeout : 60000 } } ) ;
1411+ let result = await tableClient . createEntity ( testEntity ) ;
1412+
1413+ const anotherPartitionKey = createUniquePartitionKey ( "" ) ;
1414+ const anotherEntity : TableTestEntity =
1415+ entityFactory . createBasicEntityForTest ( anotherPartitionKey ) ;
1416+ anotherEntity . int64Field = { value : "1234" , type : "Int64" } ;
1417+
1418+ result = await tableClient . createEntity ( anotherEntity ) ;
1419+ assert . ok ( result . etag ) ;
1420+
1421+ for await ( const entity of tableClient
1422+ . listEntities < TableTestEntity > ( {
1423+ queryOptions : {
1424+ filter : `int64Field gt 1233L and int64Field lt 1235L`
1425+ }
1426+ } ) ) {
1427+ assert . deepStrictEqual ( entity . int64Field , 1234n ) ;
1428+ }
1429+
1430+ await tableClient . deleteTable ( ) ;
1431+ } ) ;
1432+
1433+ it ( "24. should find the correct negative long int, @loki" , async ( ) => {
1434+ const tableClient = createAzureDataTablesClient (
1435+ testLocalAzuriteInstance ,
1436+ getUniqueName ( "longint" )
1437+ ) ;
1438+ const partitionKey = createUniquePartitionKey ( "" ) ;
1439+ const testEntity : TableTestEntity =
1440+ entityFactory . createBasicEntityForTest ( partitionKey ) ;
1441+ testEntity . int64Field = { value : "-12345" , type : "Int64" } ;
1442+
1443+ await tableClient . createTable ( { requestOptions : { timeout : 60000 } } ) ;
1444+ let result = await tableClient . createEntity ( testEntity ) ;
1445+
1446+ const anotherPartitionKey = createUniquePartitionKey ( "" ) ;
1447+ const anotherEntity : TableTestEntity =
1448+ entityFactory . createBasicEntityForTest ( anotherPartitionKey ) ;
1449+ anotherEntity . int64Field = { value : "-1234" , type : "Int64" } ;
1450+
1451+ result = await tableClient . createEntity ( anotherEntity ) ;
1452+ assert . ok ( result . etag ) ;
1453+
1454+ for await ( const entity of tableClient
1455+ . listEntities < TableTestEntity > ( {
1456+ queryOptions : {
1457+ filter : `int64Field lt -1233L and int64Field gt -1235L`
1458+ }
1459+ } ) ) {
1460+ assert . deepStrictEqual ( entity . int64Field , - 1234n ) ;
1461+ }
1462+
1463+ await tableClient . deleteTable ( ) ;
1464+ } ) ;
1465+
1466+ it ( "25. should find the correct negative long int, @loki" , async ( ) => {
1467+ const tableClient = createAzureDataTablesClient (
1468+ testLocalAzuriteInstance ,
1469+ getUniqueName ( "longint" )
1470+ ) ;
1471+ const partitionKey = createUniquePartitionKey ( "" ) ;
1472+ const testEntity : TableTestEntity =
1473+ entityFactory . createBasicEntityForTest ( partitionKey ) ;
1474+ testEntity . int64Field = { value : "12345" , type : "Int64" } ;
1475+
1476+ await tableClient . createTable ( { requestOptions : { timeout : 60000 } } ) ;
1477+ let result = await tableClient . createEntity ( testEntity ) ;
1478+
1479+ const anotherPartitionKey = createUniquePartitionKey ( "" ) ;
1480+ const anotherEntity : TableTestEntity =
1481+ entityFactory . createBasicEntityForTest ( anotherPartitionKey ) ;
1482+ anotherEntity . int64Field = { value : "-1234" , type : "Int64" } ;
1483+
1484+ result = await tableClient . createEntity ( anotherEntity ) ;
1485+ assert . ok ( result . etag ) ;
1486+
1487+ let count = 0 ;
1488+
1489+ for await ( const entity of tableClient
1490+ . listEntities < TableTestEntity > ( {
1491+ queryOptions : {
1492+ filter : `int64Field gt -1235L`
1493+ }
1494+ } ) ) {
1495+ entity ;
1496+ ++ count ;
1497+ }
1498+
1499+ assert . deepStrictEqual ( count , 2 ) ;
1500+
1501+ await tableClient . deleteTable ( ) ;
1502+ } ) ;
14001503} ) ;
0 commit comments