chore: change default ports to non-standard ones (9472, 9470, 9471)

This commit is contained in:
2026-05-06 23:23:29 +03:00
parent be370fb76b
commit 9b7ed1fca8
29 changed files with 166 additions and 166 deletions
+2 -2
View File
@@ -9,7 +9,7 @@
*
* Quick Start:
* import { Client } from 'baradb';
* const client = new Client('localhost', 5432);
* const client = new Client('localhost', 9472);
* await client.connect();
* const result = await client.query('SELECT name FROM users WHERE age > 18');
* for (const row of result) {
@@ -87,7 +87,7 @@ class QueryResult {
}
class Client {
constructor(host = 'localhost', port = 5432, options = {}) {
constructor(host = 'localhost', port = 9472, options = {}) {
this.host = host;
this.port = port;
this.database = options.database || 'default';
+1 -1
View File
@@ -241,7 +241,7 @@ type
proc defaultConfig*(): ClientConfig =
ClientConfig(
host: "127.0.0.1", port: 5432, database: "default",
host: "127.0.0.1", port: 9472, database: "default",
username: "admin", password: "", timeoutMs: 30000, maxRetries: 3,
)
+1 -1
View File
@@ -65,7 +65,7 @@ suite "Client Config":
test "Default config":
let config = defaultConfig()
check config.host == "127.0.0.1"
check config.port == 5432
check config.port == 9472
check config.database == "default"
test "Custom config":
+2 -2
View File
@@ -9,7 +9,7 @@ Install:
Quick Start:
from baradb import Client
client = Client("localhost", 5432)
client = Client("localhost", 9472)
client.connect()
result = client.query("SELECT name FROM users WHERE age > 18")
for row in result:
@@ -106,7 +106,7 @@ class QueryResult:
class Client:
"""BaraDB database client."""
def __init__(self, host: str = "localhost", port: int = 5432,
def __init__(self, host: str = "localhost", port: int = 9472,
database: str = "default", username: str = "admin",
password: str = "", timeout: int = 30):
self.host = host
+2 -2
View File
@@ -6,7 +6,7 @@
//! ```no_run
//! use baradb::Client;
//!
//! let mut client = Client::connect("localhost", 5432).unwrap();
//! let mut client = Client::connect("localhost", 9472).unwrap();
//! let result = client.query("SELECT name FROM users WHERE age > 18").unwrap();
//! for row in result.rows() {
//! println!("{}", row["name"]);
@@ -54,7 +54,7 @@ impl Default for Config {
fn default() -> Self {
Config {
host: "127.0.0.1".to_string(),
port: 5432,
port: 9472,
database: "default".to_string(),
username: "admin".to_string(),
password: String::new(),