Code examples
/
Database APIs (g.sys.db)
Query for get data
The code in every language
Each example is the inside of main, written in every language API Maker runs : pick yours in the tabs, and every page shows it from then on. The types a call takes (GetAll, DeepItem…) are those of am : from am import GetAll in Python, use am::GetAll; in Rust, import am.GetAll; in Java and Kotlin ; PHP and C# have them without an import, Go names them am.GetAll.
Simple query
TypeScript Python PHP C# Go Rust Java Kotlin
Simple query to get data let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"first_name" : "Bob"
},
});
Simple query to get data query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'first_name' : 'Bob' ,
},
)
Simple query to get data $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'first_name' => 'Bob',
],
);
Simple query to get data var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["first_name"] = "Bob" ,
},
});
Simple query to get data query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"first_name" : "Bob" ,
},
})
if err != nil {
return nil , err
}
Simple query to get data let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"first_name" : "Bob" ,
})),
) ? ;
Simple query to get data var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"first_name" , "Bob"
)));
Simple query to get data val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"first_name" to "Bob" ,
)),
)
TypeScript Python PHP C# Go Rust Java Kotlin
query headers let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"first_name" : "Bob"
},
headers : {
"x-am-response-case" : "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
},
});
query headers query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'first_name' : 'Bob' ,
},
headers = {
'x-am-response-case' : 'capitalCase' , # noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
},
)
query headers $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'first_name' => 'Bob',
],
headers: [
'x-am-response-case' => 'capitalCase', // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
],
);
query headers var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["first_name"] = "Bob" ,
},
Headers = new JsonObject
{
["x-am-response-case"] = "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
},
});
query headers query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"first_name" : "Bob" ,
},
Headers : am . M {
"x-am-response-case" : "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
},
})
if err != nil {
return nil , err
}
query headers let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"first_name" : "Bob" ,
}))
. headers ( json ! ({
"x-am-response-case" : "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
})),
) ? ;
query headers var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"first_name" , "Bob"
))
. headers ( Map . of (
"x-am-response-case" , "capitalCase" // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
)));
query headers val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"first_name" to "Bob" ,
))
. headers ( mapOf (
"x-am-response-case" to "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
)),
)
query [select]
TypeScript Python PHP C# Go Rust Java Kotlin
query select let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"first_name" : "Bob"
},
select : "first_name"
});
query select query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'first_name' : 'Bob' ,
},
select = 'first_name' ,
)
query select $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'first_name' => 'Bob',
],
select: 'first_name',
);
query select var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["first_name"] = "Bob" ,
},
Select = "first_name" ,
});
query select query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"first_name" : "Bob" ,
},
Select : "first_name" ,
})
if err != nil {
return nil , err
}
query select let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"first_name" : "Bob" ,
}))
. select ( "first_name" ),
) ? ;
query select var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"first_name" , "Bob"
))
. select ( "first_name" ));
query select val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"first_name" to "Bob" ,
))
. select ( "first_name" ),
)
query [limit]
TypeScript Python PHP C# Go Rust Java Kotlin
query limit let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"first_name" : "Bob"
},
limit : 2
});
query limit query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'first_name' : 'Bob' ,
},
limit = 2 ,
)
query limit $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'first_name' => 'Bob',
],
limit: 2,
);
query limit var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["first_name"] = "Bob" ,
},
Limit = 2 ,
});
query limit query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"first_name" : "Bob" ,
},
Limit : 2 ,
})
if err != nil {
return nil , err
}
query limit let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"first_name" : "Bob" ,
}))
. limit ( 2 ),
) ? ;
query limit var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"first_name" , "Bob"
))
. limit ( 2 ));
query limit val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"first_name" to "Bob" ,
))
. limit ( 2 ),
)
query [skip]
TypeScript Python PHP C# Go Rust Java Kotlin
query skip let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"first_name" : "Bob"
},
skip : 1
});
query skip query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'first_name' : 'Bob' ,
},
skip = 1 ,
)
query skip $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'first_name' => 'Bob',
],
skip: 1,
);
query skip var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["first_name"] = "Bob" ,
},
Skip = 1 ,
});
query skip query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"first_name" : "Bob" ,
},
Skip : 1 ,
})
if err != nil {
return nil , err
}
query skip let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"first_name" : "Bob" ,
}))
. skip ( 1 ),
) ? ;
query skip var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"first_name" , "Bob"
))
. skip ( 1 ));
query skip val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"first_name" to "Bob" ,
))
. skip ( 1 ),
)
query [sort]
TypeScript Python PHP C# Go Rust Java Kotlin
query sort let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"first_name" : "Bob"
},
sort : "first_name"
});
query sort query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'first_name' : 'Bob' ,
},
sort = 'first_name' ,
)
query sort $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'first_name' => 'Bob',
],
sort: 'first_name',
);
query sort var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["first_name"] = "Bob" ,
},
Sort = "first_name" ,
});
query sort query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"first_name" : "Bob" ,
},
Sort : "first_name" ,
})
if err != nil {
return nil , err
}
query sort let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"first_name" : "Bob" ,
}))
. sort ( "first_name" ),
) ? ;
query sort var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"first_name" , "Bob"
))
. sort ( "first_name" ));
query sort val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"first_name" to "Bob" ,
))
. sort ( "first_name" ),
)
query [deep]
TypeScript Python PHP C# Go Rust Java Kotlin
query deep let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"first_name" : "Bob"
},
deep : [
{
s_key : "customer_id" ,
t_instance : "mysql" ,
t_db : "inventory" ,
t_col : "products" ,
t_key : "owner_id" ,
}
],
});
query deep query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'first_name' : 'Bob' ,
},
deep = [
DeepItem (
'customer_id' ,
t_instance = 'mysql' ,
t_db = 'inventory' ,
t_col = 'products' ,
t_key = 'owner_id' ,
),
],
)
query deep $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'first_name' => 'Bob',
],
deep: [
new DeepItem(
'customer_id',
tInstance: 'mysql',
tDb: 'inventory',
tCol: 'products',
tKey: 'owner_id',
),
],
);
query deep var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["first_name"] = "Bob" ,
},
Deep = new []
{
new DeepItem ( "customer_id" )
{
TInstance = "mysql" ,
TDb = "inventory" ,
TCol = "products" ,
TKey = "owner_id" ,
},
},
});
query deep query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"first_name" : "Bob" ,
},
Deep : [] am . DeepItem {
{
SKey : "customer_id" ,
TInstance : "mysql" ,
TDb : "inventory" ,
TCol : "products" ,
TKey : "owner_id" ,
},
},
})
if err != nil {
return nil , err
}
query deep let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"first_name" : "Bob" ,
}))
. deep ( vec! [
DeepItem :: new ( "customer_id" )
. t_instance ( "mysql" )
. t_db ( "inventory" )
. t_col ( "products" )
. t_key ( "owner_id" ),
]),
) ? ;
query deep var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"first_name" , "Bob"
))
. deep ( List . of (
new DeepItem ( "customer_id" )
. tInstance ( "mysql" )
. tDb ( "inventory" )
. tCol ( "products" )
. tKey ( "owner_id" )
)));
query deep val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"first_name" to "Bob" ,
))
. deep ( listOf (
DeepItem ( "customer_id" )
. tInstance ( "mysql" )
. tDb ( "inventory" )
. tCol ( "products" )
. tKey ( "owner_id" ),
)),
)
$lt [less than] query
TypeScript Python PHP C# Go Rust Java Kotlin
less than query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
customer_id : {
"$lt" : 2
}
}
});
less than query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'customer_id' : {
'$lt' : 2 ,
},
},
)
less than query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'customer_id' => [
'$lt' => 2,
],
],
);
less than query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["customer_id"] = new JsonObject
{
["$lt"] = 2 ,
},
},
});
less than query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"customer_id" : am . M {
"$lt" : 2 ,
},
},
})
if err != nil {
return nil , err
}
less than query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"customer_id" : {
"$lt" : 2 ,
},
})),
) ? ;
less than query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"customer_id" , Map . of (
"$lt" , 2
)
)));
less than query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"customer_id" to mapOf (
"\ $ lt " to 2 ,
),
)),
)
$lte [less than equal] query
TypeScript Python PHP C# Go Rust Java Kotlin
less than equal query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
customer_id : {
"$lte" : 2
}
}
});
less than equal query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'customer_id' : {
'$lte' : 2 ,
},
},
)
less than equal query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'customer_id' => [
'$lte' => 2,
],
],
);
less than equal query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["customer_id"] = new JsonObject
{
["$lte"] = 2 ,
},
},
});
less than equal query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"customer_id" : am . M {
"$lte" : 2 ,
},
},
})
if err != nil {
return nil , err
}
less than equal query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"customer_id" : {
"$lte" : 2 ,
},
})),
) ? ;
less than equal query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"customer_id" , Map . of (
"$lte" , 2
)
)));
less than equal query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"customer_id" to mapOf (
"\ $ lte " to 2 ,
),
)),
)
$gt [greater than] query
TypeScript Python PHP C# Go Rust Java Kotlin
greater than query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
customer_id : {
"$gt" : 2
}
}
});
greater than query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'customer_id' : {
'$gt' : 2 ,
},
},
)
greater than query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'customer_id' => [
'$gt' => 2,
],
],
);
greater than query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["customer_id"] = new JsonObject
{
["$gt"] = 2 ,
},
},
});
greater than query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"customer_id" : am . M {
"$gt" : 2 ,
},
},
})
if err != nil {
return nil , err
}
greater than query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"customer_id" : {
"$gt" : 2 ,
},
})),
) ? ;
greater than query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"customer_id" , Map . of (
"$gt" , 2
)
)));
greater than query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"customer_id" to mapOf (
"\ $ gt " to 2 ,
),
)),
)
$gte [greater than equal] query
TypeScript Python PHP C# Go Rust Java Kotlin
greater than equal query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
customer_id : {
"$gte" : 2
}
}
});
greater than equal query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'customer_id' : {
'$gte' : 2 ,
},
},
)
greater than equal query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'customer_id' => [
'$gte' => 2,
],
],
);
greater than equal query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["customer_id"] = new JsonObject
{
["$gte"] = 2 ,
},
},
});
greater than equal query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"customer_id" : am . M {
"$gte" : 2 ,
},
},
})
if err != nil {
return nil , err
}
greater than equal query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"customer_id" : {
"$gte" : 2 ,
},
})),
) ? ;
greater than equal query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"customer_id" , Map . of (
"$gte" , 2
)
)));
greater than equal query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"customer_id" to mapOf (
"\ $ gte " to 2 ,
),
)),
)
$eq [equal to] query
TypeScript Python PHP C# Go Rust Java Kotlin
$eq query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
customer_id : {
"$eq" : 2
}
}
});
$eq query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'customer_id' : {
'$eq' : 2 ,
},
},
)
$eq query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'customer_id' => [
'$eq' => 2,
],
],
);
$eq query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["customer_id"] = new JsonObject
{
["$eq"] = 2 ,
},
},
});
$eq query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"customer_id" : am . M {
"$eq" : 2 ,
},
},
})
if err != nil {
return nil , err
}
$eq query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"customer_id" : {
"$eq" : 2 ,
},
})),
) ? ;
$eq query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"customer_id" , Map . of (
"$eq" , 2
)
)));
$eq query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"customer_id" to mapOf (
"\ $ eq " to 2 ,
),
)),
)
$ne [not equal to] query
TypeScript Python PHP C# Go Rust Java Kotlin
$ne query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
customer_id : {
"$ne" : 2
}
}
});
$ne query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'customer_id' : {
'$ne' : 2 ,
},
},
)
$ne query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'customer_id' => [
'$ne' => 2,
],
],
);
$ne query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["customer_id"] = new JsonObject
{
["$ne"] = 2 ,
},
},
});
$ne query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"customer_id" : am . M {
"$ne" : 2 ,
},
},
})
if err != nil {
return nil , err
}
$ne query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"customer_id" : {
"$ne" : 2 ,
},
})),
) ? ;
$ne query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"customer_id" , Map . of (
"$ne" , 2
)
)));
$ne query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"customer_id" to mapOf (
"\ $ ne " to 2 ,
),
)),
)
$not [not] query
TypeScript Python PHP C# Go Rust Java Kotlin
$not query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
customer_id : {
"$not" : {
"$in" : [ 1 , 2 , 3 , 4 ]
}
}
}
});
$not query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'customer_id' : {
'$not' : {
'$in' : [ 1 , 2 , 3 , 4 ],
},
},
},
)
$not query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'customer_id' => [
'$not' => [
'$in' => [1, 2, 3, 4],
],
],
],
);
$not query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["customer_id"] = new JsonObject
{
["$not"] = new JsonObject
{
["$in"] = new JsonArray { 1 , 2 , 3 , 4 },
},
},
},
});
$not query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"customer_id" : am . M {
"$not" : am . M {
"$in" : [] any { 1 , 2 , 3 , 4 },
},
},
},
})
if err != nil {
return nil , err
}
$not query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"customer_id" : {
"$not" : {
"$in" : [ 1 , 2 , 3 , 4 ],
},
},
})),
) ? ;
$not query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"customer_id" , Map . of (
"$not" , Map . of (
"$in" , List . of ( 1 , 2 , 3 , 4 )
)
)
)));
$not query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"customer_id" to mapOf (
"\ $ not " to mapOf (
"\ $ in " to listOf ( 1 , 2 , 3 , 4 ),
),
),
)),
)
$and [and] query
TypeScript Python PHP C# Go Rust Java Kotlin
$and query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"$and" : [
{
"customer_id" : 2
},
{
"pincode" : 7171
}
]
}
});
$and query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'$and' : [
{
'customer_id' : 2 ,
},
{
'pincode' : 7171 ,
},
],
},
)
$and query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'$and' => [
[
'customer_id' => 2,
],
[
'pincode' => 7171,
],
],
],
);
$and query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["$and"] = new JsonArray
{
new JsonObject
{
["customer_id"] = 2 ,
},
new JsonObject
{
["pincode"] = 7171 ,
},
},
},
});
$and query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"$and" : [] any {
am . M {
"customer_id" : 2 ,
},
am . M {
"pincode" : 7171 ,
},
},
},
})
if err != nil {
return nil , err
}
$and query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"$and" : [
{
"customer_id" : 2 ,
},
{
"pincode" : 7171 ,
},
],
})),
) ? ;
$and query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"$and" , List . of (
Map . of (
"customer_id" , 2
),
Map . of (
"pincode" , 7171
)
)
)));
$and query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"\ $ and " to listOf (
mapOf (
"customer_id" to 2 ,
),
mapOf (
"pincode" to 7171 ,
),
),
)),
)
Find-join example
TypeScript Python PHP C# Go Rust Java Kotlin
find join $and query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"$and" : [
{
"first_name.customer_id.shipping_id" : 2
},
{
"first_name.customer_id.order_id" : 58
}
]
}
});
find join $and query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'$and' : [
{
'first_name.customer_id.shipping_id' : 2 ,
},
{
'first_name.customer_id.order_id' : 58 ,
},
],
},
)
find join $and query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'$and' => [
[
'first_name.customer_id.shipping_id' => 2,
],
[
'first_name.customer_id.order_id' => 58,
],
],
],
);
find join $and query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["$and"] = new JsonArray
{
new JsonObject
{
["first_name.customer_id.shipping_id"] = 2 ,
},
new JsonObject
{
["first_name.customer_id.order_id"] = 58 ,
},
},
},
});
find join $and query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"$and" : [] any {
am . M {
"first_name.customer_id.shipping_id" : 2 ,
},
am . M {
"first_name.customer_id.order_id" : 58 ,
},
},
},
})
if err != nil {
return nil , err
}
find join $and query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"$and" : [
{
"first_name.customer_id.shipping_id" : 2 ,
},
{
"first_name.customer_id.order_id" : 58 ,
},
],
})),
) ? ;
find join $and query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"$and" , List . of (
Map . of (
"first_name.customer_id.shipping_id" , 2
),
Map . of (
"first_name.customer_id.order_id" , 58
)
)
)));
find join $and query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"\ $ and " to listOf (
mapOf (
"first_name.customer_id.shipping_id" to 2 ,
),
mapOf (
"first_name.customer_id.order_id" to 58 ,
),
),
)),
)
$or [or] query
TypeScript Python PHP C# Go Rust Java Kotlin
$or query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"$or" : [
{
"customer_id" : 2
},
{
"pincode" : 7171
}
]
}
});
$or query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'$or' : [
{
'customer_id' : 2 ,
},
{
'pincode' : 7171 ,
},
],
},
)
$or query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'$or' => [
[
'customer_id' => 2,
],
[
'pincode' => 7171,
],
],
],
);
$or query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["$or"] = new JsonArray
{
new JsonObject
{
["customer_id"] = 2 ,
},
new JsonObject
{
["pincode"] = 7171 ,
},
},
},
});
$or query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"$or" : [] any {
am . M {
"customer_id" : 2 ,
},
am . M {
"pincode" : 7171 ,
},
},
},
})
if err != nil {
return nil , err
}
$or query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"$or" : [
{
"customer_id" : 2 ,
},
{
"pincode" : 7171 ,
},
],
})),
) ? ;
$or query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"$or" , List . of (
Map . of (
"customer_id" , 2
),
Map . of (
"pincode" , 7171
)
)
)));
$or query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"\ $ or " to listOf (
mapOf (
"customer_id" to 2 ,
),
mapOf (
"pincode" to 7171 ,
),
),
)),
)
Find-join example
TypeScript Python PHP C# Go Rust Java Kotlin
find join $or query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"$or" : [
{
"first_name.customer_id.shipping_id" : 2
},
{
"first_name.customer_id.order_id" : 58
}
]
}
});
find join $or query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'$or' : [
{
'first_name.customer_id.shipping_id' : 2 ,
},
{
'first_name.customer_id.order_id' : 58 ,
},
],
},
)
find join $or query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'$or' => [
[
'first_name.customer_id.shipping_id' => 2,
],
[
'first_name.customer_id.order_id' => 58,
],
],
],
);
find join $or query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["$or"] = new JsonArray
{
new JsonObject
{
["first_name.customer_id.shipping_id"] = 2 ,
},
new JsonObject
{
["first_name.customer_id.order_id"] = 58 ,
},
},
},
});
find join $or query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"$or" : [] any {
am . M {
"first_name.customer_id.shipping_id" : 2 ,
},
am . M {
"first_name.customer_id.order_id" : 58 ,
},
},
},
})
if err != nil {
return nil , err
}
find join $or query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"$or" : [
{
"first_name.customer_id.shipping_id" : 2 ,
},
{
"first_name.customer_id.order_id" : 58 ,
},
],
})),
) ? ;
find join $or query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"$or" , List . of (
Map . of (
"first_name.customer_id.shipping_id" , 2
),
Map . of (
"first_name.customer_id.order_id" , 58
)
)
)));
find join $or query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"\ $ or " to listOf (
mapOf (
"first_name.customer_id.shipping_id" to 2 ,
),
mapOf (
"first_name.customer_id.order_id" to 58 ,
),
),
)),
)
$in [in] query
TypeScript Python PHP C# Go Rust Java Kotlin
$in query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"customer_id" : {
"$in" : [ 1 , 2 ]
}
}
});
$in query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'customer_id' : {
'$in' : [ 1 , 2 ],
},
},
)
$in query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'customer_id' => [
'$in' => [1, 2],
],
],
);
$in query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["customer_id"] = new JsonObject
{
["$in"] = new JsonArray { 1 , 2 },
},
},
});
$in query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"customer_id" : am . M {
"$in" : [] any { 1 , 2 },
},
},
})
if err != nil {
return nil , err
}
$in query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"customer_id" : {
"$in" : [ 1 , 2 ],
},
})),
) ? ;
$in query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"customer_id" , Map . of (
"$in" , List . of ( 1 , 2 )
)
)));
$in query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"customer_id" to mapOf (
"\ $ in " to listOf ( 1 , 2 ),
),
)),
)
$nin [not in] query
TypeScript Python PHP C# Go Rust Java Kotlin
$nin query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"customer_id" : {
"$nin" : [ 1 , 2 ]
}
}
});
$nin query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'customer_id' : {
'$nin' : [ 1 , 2 ],
},
},
)
$nin query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'customer_id' => [
'$nin' => [1, 2],
],
],
);
$nin query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["customer_id"] = new JsonObject
{
["$nin"] = new JsonArray { 1 , 2 },
},
},
});
$nin query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"customer_id" : am . M {
"$nin" : [] any { 1 , 2 },
},
},
})
if err != nil {
return nil , err
}
$nin query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"customer_id" : {
"$nin" : [ 1 , 2 ],
},
})),
) ? ;
$nin query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"customer_id" , Map . of (
"$nin" , List . of ( 1 , 2 )
)
)));
$nin query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"customer_id" to mapOf (
"\ $ nin " to listOf ( 1 , 2 ),
),
)),
)
$like [like] query
TypeScript Python PHP C# Go Rust Java Kotlin
$like query let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"first_name" : {
"$like" : "Bob%"
}
}
});
$like query query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'first_name' : {
'$like' : 'Bob%' ,
},
},
)
$like query $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'first_name' => [
'$like' => 'Bob%',
],
],
);
$like query var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["first_name"] = new JsonObject
{
["$like"] = "Bob%" ,
},
},
});
$like query query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"first_name" : am . M {
"$like" : "Bob%" ,
},
},
})
if err != nil {
return nil , err
}
$like query let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"first_name" : {
"$like" : "Bob%" ,
},
})),
) ? ;
$like query var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"first_name" , Map . of (
"$like" , "Bob%"
)
)));
$like query val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"first_name" to mapOf (
"\ $ like " to "Bob%" ,
),
)),
)
$isNull [null check] with sql databases
TypeScript Python PHP C# Go Rust Java Kotlin
$isNull use let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"first_name" : {
"$isNull" : true
}
}
});
$isNull use query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'first_name' : {
'$isNull' : True ,
},
},
)
$isNull use $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'first_name' => [
'$isNull' => true,
],
],
);
$isNull use var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["first_name"] = new JsonObject
{
["$isNull"] = true ,
},
},
});
$isNull use query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"first_name" : am . M {
"$isNull" : true ,
},
},
})
if err != nil {
return nil , err
}
$isNull use let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"first_name" : {
"$isNull" : true ,
},
})),
) ? ;
$isNull use var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"first_name" , Map . of (
"$isNull" , true
)
)));
$isNull use val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"first_name" to mapOf (
"\ $ isNull " to true ,
),
)),
)
MongoDB $in operator in nested find
TypeScript Python PHP C# Go Rust Java Kotlin
$in operator in nested find let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"eventListeners.versions.name" : {
"$in" : [
"Original" ,
"1"
]
}
}
});
$in operator in nested find query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'eventListeners.versions.name' : {
'$in' : [
'Original' ,
'1' ,
],
},
},
)
$in operator in nested find $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'eventListeners.versions.name' => [
'$in' => [
'Original',
'1',
],
],
],
);
$in operator in nested find var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["eventListeners.versions.name"] = new JsonObject
{
["$in"] = new JsonArray
{
"Original" ,
"1" ,
},
},
},
});
$in operator in nested find query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"eventListeners.versions.name" : am . M {
"$in" : [] string {
"Original" ,
"1" ,
},
},
},
})
if err != nil {
return nil , err
}
$in operator in nested find let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"eventListeners.versions.name" : {
"$in" : [
"Original" ,
"1" ,
],
},
})),
) ? ;
$in operator in nested find var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"eventListeners.versions.name" , Map . of (
"$in" , List . of (
"Original" ,
"1"
)
)
)));
$in operator in nested find val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"eventListeners.versions.name" to mapOf (
"\ $ in " to listOf (
"Original" ,
"1" ,
),
),
)),
)
MongoDB $nin operator in nested find
TypeScript Python PHP C# Go Rust Java Kotlin
$nin operator in nested find let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"eventListeners.versions.name" : {
"$nin" : [
"Original" ,
"1"
]
}
}
});
$nin operator in nested find query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'eventListeners.versions.name' : {
'$nin' : [
'Original' ,
'1' ,
],
},
},
)
$nin operator in nested find $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'eventListeners.versions.name' => [
'$nin' => [
'Original',
'1',
],
],
],
);
$nin operator in nested find var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["eventListeners.versions.name"] = new JsonObject
{
["$nin"] = new JsonArray
{
"Original" ,
"1" ,
},
},
},
});
$nin operator in nested find query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"eventListeners.versions.name" : am . M {
"$nin" : [] string {
"Original" ,
"1" ,
},
},
},
})
if err != nil {
return nil , err
}
$nin operator in nested find let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"eventListeners.versions.name" : {
"$nin" : [
"Original" ,
"1" ,
],
},
})),
) ? ;
$nin operator in nested find var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"eventListeners.versions.name" , Map . of (
"$nin" , List . of (
"Original" ,
"1"
)
)
)));
$nin operator in nested find val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"eventListeners.versions.name" to mapOf (
"\ $ nin " to listOf (
"Original" ,
"1" ,
),
),
)),
)
MongoDB $and operator in nested find
TypeScript Python PHP C# Go Rust Java Kotlin
$and operator in nested find let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"$and" : [
{
"eventListeners.versions.name" : "Original"
},
{
"eventListeners.versions.version" : "-1"
}
]
}
});
$and operator in nested find query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'$and' : [
{
'eventListeners.versions.name' : 'Original' ,
},
{
'eventListeners.versions.version' : '-1' ,
},
],
},
)
$and operator in nested find $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'$and' => [
[
'eventListeners.versions.name' => 'Original',
],
[
'eventListeners.versions.version' => '-1',
],
],
],
);
$and operator in nested find var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["$and"] = new JsonArray
{
new JsonObject
{
["eventListeners.versions.name"] = "Original" ,
},
new JsonObject
{
["eventListeners.versions.version"] = "-1" ,
},
},
},
});
$and operator in nested find query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"$and" : [] any {
am . M {
"eventListeners.versions.name" : "Original" ,
},
am . M {
"eventListeners.versions.version" : "-1" ,
},
},
},
})
if err != nil {
return nil , err
}
$and operator in nested find let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"$and" : [
{
"eventListeners.versions.name" : "Original" ,
},
{
"eventListeners.versions.version" : "-1" ,
},
],
})),
) ? ;
$and operator in nested find var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"$and" , List . of (
Map . of (
"eventListeners.versions.name" , "Original"
),
Map . of (
"eventListeners.versions.version" , "-1"
)
)
)));
$and operator in nested find val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"\ $ and " to listOf (
mapOf (
"eventListeners.versions.name" to "Original" ,
),
mapOf (
"eventListeners.versions.version" to "-1" ,
),
),
)),
)
MongoDB $or operator in nested find
TypeScript Python PHP C# Go Rust Java Kotlin
$or operator in nested find let query = await g . sys . db . query ({
instance : "mysql_8" , database : "inventory" , collection : "customers" ,
find : {
"$or" : [
{
"eventListeners.versions.name" : "Original"
},
{
"eventListeners.versions.version" : "-1"
}
]
}
});
$or operator in nested find query = await g . sys . db . query (
'mysql_8' , 'inventory' , 'customers' ,
find = {
'$or' : [
{
'eventListeners.versions.name' : 'Original' ,
},
{
'eventListeners.versions.version' : '-1' ,
},
],
},
)
$or operator in nested find $query = $g->sys->db->query(
'mysql_8', 'inventory', 'customers',
find: [
'$or' => [
[
'eventListeners.versions.name' => 'Original',
],
[
'eventListeners.versions.version' => '-1',
],
],
],
);
$or operator in nested find var query = await g . Sys . Db . Query ( new Query ( "mysql_8" , "inventory" , "customers" )
{
Find = new JsonObject
{
["$or"] = new JsonArray
{
new JsonObject
{
["eventListeners.versions.name"] = "Original" ,
},
new JsonObject
{
["eventListeners.versions.version"] = "-1" ,
},
},
},
});
$or operator in nested find query , err := g . Sys . Db . Query ( am . Query {
Instance : "mysql_8" , Database : "inventory" , Collection : "customers" ,
Find : am . M {
"$or" : [] any {
am . M {
"eventListeners.versions.name" : "Original" ,
},
am . M {
"eventListeners.versions.version" : "-1" ,
},
},
},
})
if err != nil {
return nil , err
}
$or operator in nested find let query = g . sys . db . query (
Query :: new ( "mysql_8" , "inventory" , "customers" )
. find ( json ! ({
"$or" : [
{
"eventListeners.versions.name" : "Original" ,
},
{
"eventListeners.versions.version" : "-1" ,
},
],
})),
) ? ;
$or operator in nested find var query = g . sys . db . query ( new Query ( "mysql_8" , "inventory" , "customers" )
. find ( Map . of (
"$or" , List . of (
Map . of (
"eventListeners.versions.name" , "Original"
),
Map . of (
"eventListeners.versions.version" , "-1"
)
)
)));
$or operator in nested find val query = g . sys . db . query (
Query ( "mysql_8" , "inventory" , "customers" )
. find ( mapOf (
"\ $ or " to listOf (
mapOf (
"eventListeners.versions.name" to "Original" ,
),
mapOf (
"eventListeners.versions.version" to "-1" ,
),
),
)),
)
Structure
TypeScript Python PHP C# Go Rust Java Kotlin
query with all params let query = await g . sys . db . query ({
instance : "INSTANCE_NAME" , database : 'DB_NAME' , collection : "COLLECTION_NAME" ,
find : {
"COLUMN_NAME" : "VALUE"
},
limit : 10 ,
select : "COMMA_SEPARATED_COLUMN_NAMES" ,
deep : [
{
s_key : "SOURCE_COLLECTION_COLUMN_NAME" ,
t_instance : "TARGET_INSTANCE_NAME" ,
t_db : "TARGET_DATABASE_NAME" ,
t_col : "TARGET_COLLECTION_NAME" ,
t_key : "TARGET_COLLECTION_COLUMN_NAME" ,
find : {
"COLUMN_NAME" : "COLUMN_VALUE"
},
isMultiple : true ,
limit : 10 ,
select : "COMMA_SEPARATED_COLUMN_NAMES" ,
skip : 2 ,
sort : "COLUMN_NAME" ,
}
],
skip : 1 ,
sort : "COLUMN_NAME" ,
groupBy : "COLUMN_NAME" ,
getTotalCount : true ,
headers : {
"x-am-response-case" : "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
"x-am-response-object-type" : "make_flat" , // no_action | make_flat
"x-am-meta" : "true" , // true, false
"x-am-internationalization" : "USER_I18N_ID" ,
"x-am-run-in-sandbox" : "2" ,
"x-am-content-type-response" : "text/xml" , // application/json | text/xml | text/yaml | text/plain | text/html | application/octet-stream
"x-am-cache-control" : "reset_cache" , // no_action | reset_cache
"x-am-get-encrypted-data" : "get_only_encryption" , // no_encryption | get_only_encryption | get_data_and_encryption
"x-am-sandbox-timeout" : "13000" ,
"x-no-compression" : "true" , // true | false
"x-am-encrypted-payload" : "true" , // user will send 'true', when payload is encrypted for transfer
// Multi-tenant : the tenant of the request, each instance finds it in its own tenants table
"x-am-tenant-username" : "TENANT_USERNAME" , // ex: acme
// Authorization headers
"x-am-authorization" : "AUTHORIZATION_TOKEN" ,
"x-am-user-authorization" : "API_USER_TOKEN" ,
"x-aws-authorization" : "AWS_TOKEN" ,
"x-google-authorization" : "GOOGLE_TOKEN" ,
"x-azure-authorization" : "AZURE_TOKEN" ,
},
}, true );
query with all params query = await g . sys . db . full . query (
'INSTANCE_NAME' , 'DB_NAME' , 'COLLECTION_NAME' ,
find = {
'COLUMN_NAME' : 'VALUE' ,
},
limit = 10 ,
select = 'COMMA_SEPARATED_COLUMN_NAMES' ,
deep = [
DeepItem (
'SOURCE_COLLECTION_COLUMN_NAME' ,
t_instance = 'TARGET_INSTANCE_NAME' ,
t_db = 'TARGET_DATABASE_NAME' ,
t_col = 'TARGET_COLLECTION_NAME' ,
t_key = 'TARGET_COLLECTION_COLUMN_NAME' ,
find = {
'COLUMN_NAME' : 'COLUMN_VALUE' ,
},
is_multiple = True ,
limit = 10 ,
select = 'COMMA_SEPARATED_COLUMN_NAMES' ,
skip = 2 ,
sort = 'COLUMN_NAME' ,
),
],
skip = 1 ,
sort = 'COLUMN_NAME' ,
group_by = 'COLUMN_NAME' ,
get_total_count = True ,
headers = {
'x-am-response-case' : 'capitalCase' , # noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
'x-am-response-object-type' : 'make_flat' , # no_action | make_flat
'x-am-meta' : 'true' , # true, false
'x-am-internationalization' : 'USER_I18N_ID' ,
'x-am-run-in-sandbox' : '2' ,
'x-am-content-type-response' : 'text/xml' , # application/json | text/xml | text/yaml | text/plain | text/html | application/octet-stream
'x-am-cache-control' : 'reset_cache' , # no_action | reset_cache
'x-am-get-encrypted-data' : 'get_only_encryption' , # no_encryption | get_only_encryption | get_data_and_encryption
'x-am-sandbox-timeout' : '13000' ,
'x-no-compression' : 'true' , # true | false
'x-am-encrypted-payload' : 'true' , # user will send 'true', when payload is encrypted for transfer
# Multi-tenant : the tenant of the request, each instance finds it in its own tenants table
'x-am-tenant-username' : 'TENANT_USERNAME' , # ex: acme
# Authorization headers
'x-am-authorization' : 'AUTHORIZATION_TOKEN' ,
'x-am-user-authorization' : 'API_USER_TOKEN' ,
'x-aws-authorization' : 'AWS_TOKEN' ,
'x-google-authorization' : 'GOOGLE_TOKEN' ,
'x-azure-authorization' : 'AZURE_TOKEN' ,
},
)
query with all params $query = $g->sys->db->full->query(
'INSTANCE_NAME', 'DB_NAME', 'COLLECTION_NAME',
find: [
'COLUMN_NAME' => 'VALUE',
],
limit: 10,
select: 'COMMA_SEPARATED_COLUMN_NAMES',
deep: [
new DeepItem(
'SOURCE_COLLECTION_COLUMN_NAME',
tInstance: 'TARGET_INSTANCE_NAME',
tDb: 'TARGET_DATABASE_NAME',
tCol: 'TARGET_COLLECTION_NAME',
tKey: 'TARGET_COLLECTION_COLUMN_NAME',
find: [
'COLUMN_NAME' => 'COLUMN_VALUE',
],
isMultiple: true,
limit: 10,
select: 'COMMA_SEPARATED_COLUMN_NAMES',
skip: 2,
sort: 'COLUMN_NAME',
),
],
skip: 1,
sort: 'COLUMN_NAME',
groupBy: 'COLUMN_NAME',
getTotalCount: true,
headers: [
'x-am-response-case' => 'capitalCase', // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
'x-am-response-object-type' => 'make_flat', // no_action | make_flat
'x-am-meta' => 'true', // true, false
'x-am-internationalization' => 'USER_I18N_ID',
'x-am-run-in-sandbox' => '2',
'x-am-content-type-response' => 'text/xml', // application/json | text/xml | text/yaml | text/plain | text/html | application/octet-stream
'x-am-cache-control' => 'reset_cache', // no_action | reset_cache
'x-am-get-encrypted-data' => 'get_only_encryption', // no_encryption | get_only_encryption | get_data_and_encryption
'x-am-sandbox-timeout' => '13000',
'x-no-compression' => 'true', // true | false
'x-am-encrypted-payload' => 'true', // user will send 'true', when payload is encrypted for transfer
// Multi-tenant : the tenant of the request, each instance finds it in its own tenants table
'x-am-tenant-username' => 'TENANT_USERNAME', // ex: acme
// Authorization headers
'x-am-authorization' => 'AUTHORIZATION_TOKEN',
'x-am-user-authorization' => 'API_USER_TOKEN',
'x-aws-authorization' => 'AWS_TOKEN',
'x-google-authorization' => 'GOOGLE_TOKEN',
'x-azure-authorization' => 'AZURE_TOKEN',
],
);
query with all params var query = await g . Sys . Db . Full . Query ( new Query ( "INSTANCE_NAME" , "DB_NAME" , "COLLECTION_NAME" )
{
Find = new JsonObject
{
["COLUMN_NAME"] = "VALUE" ,
},
Limit = 10 ,
Select = "COMMA_SEPARATED_COLUMN_NAMES" ,
Deep = new []
{
new DeepItem ( "SOURCE_COLLECTION_COLUMN_NAME" )
{
TInstance = "TARGET_INSTANCE_NAME" ,
TDb = "TARGET_DATABASE_NAME" ,
TCol = "TARGET_COLLECTION_NAME" ,
TKey = "TARGET_COLLECTION_COLUMN_NAME" ,
Find = new JsonObject
{
["COLUMN_NAME"] = "COLUMN_VALUE" ,
},
IsMultiple = true ,
Limit = 10 ,
Select = "COMMA_SEPARATED_COLUMN_NAMES" ,
Skip = 2 ,
Sort = "COLUMN_NAME" ,
},
},
Skip = 1 ,
Sort = "COLUMN_NAME" ,
GroupBy = "COLUMN_NAME" ,
GetTotalCount = true ,
Headers = new JsonObject
{
["x-am-response-case"] = "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
["x-am-response-object-type"] = "make_flat" , // no_action | make_flat
["x-am-meta"] = "true" , // true, false
["x-am-internationalization"] = "USER_I18N_ID" ,
["x-am-run-in-sandbox"] = "2" ,
["x-am-content-type-response"] = "text/xml" , // application/json | text/xml | text/yaml | text/plain | text/html | application/octet-stream
["x-am-cache-control"] = "reset_cache" , // no_action | reset_cache
["x-am-get-encrypted-data"] = "get_only_encryption" , // no_encryption | get_only_encryption | get_data_and_encryption
["x-am-sandbox-timeout"] = "13000" ,
["x-no-compression"] = "true" , // true | false
["x-am-encrypted-payload"] = "true" , // user will send 'true', when payload is encrypted for transfer
// Multi-tenant : the tenant of the request, each instance finds it in its own tenants table
["x-am-tenant-username"] = "TENANT_USERNAME" , // ex: acme
// Authorization headers
["x-am-authorization"] = "AUTHORIZATION_TOKEN" ,
["x-am-user-authorization"] = "API_USER_TOKEN" ,
["x-aws-authorization"] = "AWS_TOKEN" ,
["x-google-authorization"] = "GOOGLE_TOKEN" ,
["x-azure-authorization"] = "AZURE_TOKEN" ,
},
});
query with all params query , err := g . Sys . Db . Full . Query ( am . Query {
Instance : "INSTANCE_NAME" , Database : "DB_NAME" , Collection : "COLLECTION_NAME" ,
Find : am . M {
"COLUMN_NAME" : "VALUE" ,
},
Limit : 10 ,
Select : "COMMA_SEPARATED_COLUMN_NAMES" ,
Deep : [] am . DeepItem {
{
SKey : "SOURCE_COLLECTION_COLUMN_NAME" ,
TInstance : "TARGET_INSTANCE_NAME" ,
TDb : "TARGET_DATABASE_NAME" ,
TCol : "TARGET_COLLECTION_NAME" ,
TKey : "TARGET_COLLECTION_COLUMN_NAME" ,
Find : am . M {
"COLUMN_NAME" : "COLUMN_VALUE" ,
},
IsMultiple : true ,
Limit : 10 ,
Select : "COMMA_SEPARATED_COLUMN_NAMES" ,
Skip : 2 ,
Sort : "COLUMN_NAME" ,
},
},
Skip : 1 ,
Sort : "COLUMN_NAME" ,
GroupBy : "COLUMN_NAME" ,
GetTotalCount : true ,
Headers : am . M {
"x-am-response-case" : "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
"x-am-response-object-type" : "make_flat" , // no_action | make_flat
"x-am-meta" : "true" , // true, false
"x-am-internationalization" : "USER_I18N_ID" ,
"x-am-run-in-sandbox" : "2" ,
"x-am-content-type-response" : "text/xml" , // application/json | text/xml | text/yaml | text/plain | text/html | application/octet-stream
"x-am-cache-control" : "reset_cache" , // no_action | reset_cache
"x-am-get-encrypted-data" : "get_only_encryption" , // no_encryption | get_only_encryption | get_data_and_encryption
"x-am-sandbox-timeout" : "13000" ,
"x-no-compression" : "true" , // true | false
"x-am-encrypted-payload" : "true" , // user will send 'true', when payload is encrypted for transfer
// Multi-tenant : the tenant of the request, each instance finds it in its own tenants table
"x-am-tenant-username" : "TENANT_USERNAME" , // ex: acme
// Authorization headers
"x-am-authorization" : "AUTHORIZATION_TOKEN" ,
"x-am-user-authorization" : "API_USER_TOKEN" ,
"x-aws-authorization" : "AWS_TOKEN" ,
"x-google-authorization" : "GOOGLE_TOKEN" ,
"x-azure-authorization" : "AZURE_TOKEN" ,
},
})
if err != nil {
return nil , err
}
query with all params let query = g . sys . db . full . query (
Query :: new ( "INSTANCE_NAME" , "DB_NAME" , "COLLECTION_NAME" )
. find ( json ! ({
"COLUMN_NAME" : "VALUE" ,
}))
. limit ( 10 )
. select ( "COMMA_SEPARATED_COLUMN_NAMES" )
. deep ( vec! [
DeepItem :: new ( "SOURCE_COLLECTION_COLUMN_NAME" )
. t_instance ( "TARGET_INSTANCE_NAME" )
. t_db ( "TARGET_DATABASE_NAME" )
. t_col ( "TARGET_COLLECTION_NAME" )
. t_key ( "TARGET_COLLECTION_COLUMN_NAME" )
. find ( json ! ({
"COLUMN_NAME" : "COLUMN_VALUE" ,
}))
. is_multiple ( true )
. limit ( 10 )
. select ( "COMMA_SEPARATED_COLUMN_NAMES" )
. skip ( 2 )
. sort ( "COLUMN_NAME" ),
])
. skip ( 1 )
. sort ( "COLUMN_NAME" )
. group_by ( "COLUMN_NAME" )
. get_total_count ( true )
. headers ( json ! ({
"x-am-response-case" : "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
"x-am-response-object-type" : "make_flat" , // no_action | make_flat
"x-am-meta" : "true" , // true, false
"x-am-internationalization" : "USER_I18N_ID" ,
"x-am-run-in-sandbox" : "2" ,
"x-am-content-type-response" : "text/xml" , // application/json | text/xml | text/yaml | text/plain | text/html | application/octet-stream
"x-am-cache-control" : "reset_cache" , // no_action | reset_cache
"x-am-get-encrypted-data" : "get_only_encryption" , // no_encryption | get_only_encryption | get_data_and_encryption
"x-am-sandbox-timeout" : "13000" ,
"x-no-compression" : "true" , // true | false
"x-am-encrypted-payload" : "true" , // user will send 'true', when payload is encrypted for transfer
// Multi-tenant : the tenant of the request, each instance finds it in its own tenants table
"x-am-tenant-username" : "TENANT_USERNAME" , // ex: acme
// Authorization headers
"x-am-authorization" : "AUTHORIZATION_TOKEN" ,
"x-am-user-authorization" : "API_USER_TOKEN" ,
"x-aws-authorization" : "AWS_TOKEN" ,
"x-google-authorization" : "GOOGLE_TOKEN" ,
"x-azure-authorization" : "AZURE_TOKEN" ,
})),
) ? ;
query with all params var query = g . sys . db . full . query ( new Query ( "INSTANCE_NAME" , "DB_NAME" , "COLLECTION_NAME" )
. find ( Map . of (
"COLUMN_NAME" , "VALUE"
))
. limit ( 10 )
. select ( "COMMA_SEPARATED_COLUMN_NAMES" )
. deep ( List . of (
new DeepItem ( "SOURCE_COLLECTION_COLUMN_NAME" )
. tInstance ( "TARGET_INSTANCE_NAME" )
. tDb ( "TARGET_DATABASE_NAME" )
. tCol ( "TARGET_COLLECTION_NAME" )
. tKey ( "TARGET_COLLECTION_COLUMN_NAME" )
. find ( Map . of (
"COLUMN_NAME" , "COLUMN_VALUE"
))
. isMultiple ( true )
. limit ( 10 )
. select ( "COMMA_SEPARATED_COLUMN_NAMES" )
. skip ( 2 )
. sort ( "COLUMN_NAME" )
))
. skip ( 1 )
. sort ( "COLUMN_NAME" )
. groupBy ( "COLUMN_NAME" )
. getTotalCount ( true )
. headers ( JsonObject . of (
"x-am-response-case" , "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
"x-am-response-object-type" , "make_flat" , // no_action | make_flat
"x-am-meta" , "true" , // true, false
"x-am-internationalization" , "USER_I18N_ID" ,
"x-am-run-in-sandbox" , "2" ,
"x-am-content-type-response" , "text/xml" , // application/json | text/xml | text/yaml | text/plain | text/html | application/octet-stream
"x-am-cache-control" , "reset_cache" , // no_action | reset_cache
"x-am-get-encrypted-data" , "get_only_encryption" , // no_encryption | get_only_encryption | get_data_and_encryption
"x-am-sandbox-timeout" , "13000" ,
"x-no-compression" , "true" , // true | false
"x-am-encrypted-payload" , "true" , // user will send 'true', when payload is encrypted for transfer
// Multi-tenant : the tenant of the request, each instance finds it in its own tenants table
"x-am-tenant-username" , "TENANT_USERNAME" , // ex: acme
// Authorization headers
"x-am-authorization" , "AUTHORIZATION_TOKEN" ,
"x-am-user-authorization" , "API_USER_TOKEN" ,
"x-aws-authorization" , "AWS_TOKEN" ,
"x-google-authorization" , "GOOGLE_TOKEN" ,
"x-azure-authorization" , "AZURE_TOKEN"
)));
query with all params val query = g . sys . db . full . query (
Query ( "INSTANCE_NAME" , "DB_NAME" , "COLLECTION_NAME" )
. find ( mapOf (
"COLUMN_NAME" to "VALUE" ,
))
. limit ( 10 )
. select ( "COMMA_SEPARATED_COLUMN_NAMES" )
. deep ( listOf (
DeepItem ( "SOURCE_COLLECTION_COLUMN_NAME" )
. tInstance ( "TARGET_INSTANCE_NAME" )
. tDb ( "TARGET_DATABASE_NAME" )
. tCol ( "TARGET_COLLECTION_NAME" )
. tKey ( "TARGET_COLLECTION_COLUMN_NAME" )
. find ( mapOf (
"COLUMN_NAME" to "COLUMN_VALUE" ,
))
. isMultiple ( true )
. limit ( 10 )
. select ( "COMMA_SEPARATED_COLUMN_NAMES" )
. skip ( 2 )
. sort ( "COLUMN_NAME" ),
))
. skip ( 1 )
. sort ( "COLUMN_NAME" )
. groupBy ( "COLUMN_NAME" )
. getTotalCount ( true )
. headers ( mapOf (
"x-am-response-case" to "capitalCase" , // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
"x-am-response-object-type" to "make_flat" , // no_action | make_flat
"x-am-meta" to "true" , // true, false
"x-am-internationalization" to "USER_I18N_ID" ,
"x-am-run-in-sandbox" to "2" ,
"x-am-content-type-response" to "text/xml" , // application/json | text/xml | text/yaml | text/plain | text/html | application/octet-stream
"x-am-cache-control" to "reset_cache" , // no_action | reset_cache
"x-am-get-encrypted-data" to "get_only_encryption" , // no_encryption | get_only_encryption | get_data_and_encryption
"x-am-sandbox-timeout" to "13000" ,
"x-no-compression" to "true" , // true | false
"x-am-encrypted-payload" to "true" , // user will send 'true', when payload is encrypted for transfer
// Multi-tenant : the tenant of the request, each instance finds it in its own tenants table
"x-am-tenant-username" to "TENANT_USERNAME" , // ex: acme
// Authorization headers
"x-am-authorization" to "AUTHORIZATION_TOKEN" ,
"x-am-user-authorization" to "API_USER_TOKEN" ,
"x-aws-authorization" to "AWS_TOKEN" ,
"x-google-authorization" to "GOOGLE_TOKEN" ,
"x-azure-authorization" to "AZURE_TOKEN" ,
)),
)
Multi-tenant
instance: "crm::acme" works on the database of the tenant acme of the multi-tenant instance crm.
With instance: "crm", the call works on the database of the tenant of the request: a custom API called with the x-am-tenant-username header passes it on to the APIs it calls. A request without a tenant works on the structure database.
TypeScript Python PHP C# Go Rust Java Kotlin
Query the customers of the tenant acme let query = await g . sys . db . query ({
instance : "crm::acme" , database : "crm" , collection : "customers" ,
find : {
"first_name" : "Bob"
},
sort : "customer_id" ,
limit : 10
});
Query the customers of the tenant acme query = await g . sys . db . query (
'crm::acme' , 'crm' , 'customers' ,
find = {
'first_name' : 'Bob' ,
},
sort = 'customer_id' ,
limit = 10 ,
)
Query the customers of the tenant acme $query = $g->sys->db->query(
'crm::acme', 'crm', 'customers',
find: [
'first_name' => 'Bob',
],
sort: 'customer_id',
limit: 10,
);
Query the customers of the tenant acme var query = await g . Sys . Db . Query ( new Query ( "crm::acme" , "crm" , "customers" )
{
Find = new JsonObject
{
["first_name"] = "Bob" ,
},
Sort = "customer_id" ,
Limit = 10 ,
});
Query the customers of the tenant acme query , err := g . Sys . Db . Query ( am . Query {
Instance : "crm::acme" , Database : "crm" , Collection : "customers" ,
Find : am . M {
"first_name" : "Bob" ,
},
Sort : "customer_id" ,
Limit : 10 ,
})
if err != nil {
return nil , err
}
Query the customers of the tenant acme let query = g . sys . db . query (
Query :: new ( "crm::acme" , "crm" , "customers" )
. find ( json ! ({
"first_name" : "Bob" ,
}))
. sort ( "customer_id" )
. limit ( 10 ),
) ? ;
Query the customers of the tenant acme var query = g . sys . db . query ( new Query ( "crm::acme" , "crm" , "customers" )
. find ( Map . of (
"first_name" , "Bob"
))
. sort ( "customer_id" )
. limit ( 10 ));
Query the customers of the tenant acme val query = g . sys . db . query (
Query ( "crm::acme" , "crm" , "customers" )
. find ( mapOf (
"first_name" to "Bob" ,
))
. sort ( "customer_id" )
. limit ( 10 ),
)
Without a schema
g.sys.db.gen.queryGen takes the same arguments and calls the query for get data generated API : no schema, so the data is read and written as it is in the table, without the conversions, validations and defaults of the schema.
Language
The call
TypeScript
g.sys.db.gen.queryGen(…)
Python
g.sys.db.gen.query_gen(…)
PHP
$g->sys->db->gen->queryGen(…)
C#, Go
g.Sys.Db.Gen.QueryGen(…)
Rust
g.sys.db.query_gen(Query::new(…))
Java, Kotlin
g.sys.db.gen.queryGen(…)