TiDB v8.5 Documentationprovides �→ more relevant search results. As one of the core functions of AI and �→ large language models (LLMs), vector search can be used in various �→ scenarios such as Retrieval-Augmented Generation which provides more relevant search results. As one of the core functions of AI and large language models (LLMs), vector search can be used in various scenarios such as Retrieval-Augmented Generation (RAG) IntegerField(default=0) class Meta: table_name = "players" For more information, refer to peewee documentation: Models and Fields. Insert data #### Insert a single record Player.create(name="test", coins=100, goods=100)0 码力 | 6730 页 | 111.36 MB | 10 月前3
TiDB v8.4 Documentationprovides �→ more relevant search results. As one of the core functions of AI and �→ large language models (LLMs), vector search can be used in various �→ scenarios such as Retrieval-Augmented Generation which provides more relevant search results. As one of the core functions of AI and large language models (LLMs), vector search can be used in various scenarios such as Retrieval-Augmented Generation (RAG) IntegerField(default=0) class Meta: table_name = "players" For more information, refer to peewee documentation: Models and Fields. Insert data #### Insert a single record Player.create(name="test", coins=100, goods=100)0 码力 | 6705 页 | 110.86 MB | 10 月前3
TiDB v6.1 中文手册py │ ├ ─ ─ apps.py │ ├ ─ ─ migrations │ │ ├ ─ ─ 0001_initial.py │ │ └ ─ ─ __init__.py │ ├ ─ ─ models.py │ ├ ─ ─ tests.py 192 │ ├ ─ ─ urls.py │ └ ─ ─ views.py └ ─ ─ manage.py 其中: • 每一个文件夹中的 __init__ manage.py startapp player 来创建一个空白的 player 应用。 – models.py 定义了 Player 数据模型。 – migrations 是一组数据模型迁移脚本。你可以使用 python manage.py makemigrations player 命 令自动分析 models.py 文件中定义的数据对象,并生成迁移脚本。 – urls.py 定义了应用的路由。 'root', 'PASSWORD': '', 'HOST': '127.0.0.1', 'PORT': 4000, }, } DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' ... 其中: • INSTALLED_APPS:启用的应用全限定名称列表。 • MIDDLEWARE:启用的中间件列表。由于本示例无需 CsrfViewMiddleware0 码力 | 3572 页 | 84.36 MB | 1 年前3
TiDB v6.1 Documentation'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } } DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' Modify the configuration above as follows. This is used for connection to TiDB. USE_TZ 'root', 'PASSWORD': '', 'HOST': '127.0.0.1', 'PORT': 4000, }, } DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' 477 4.11.3.1.4 Step 4. Write the application logic After you have configured the application’s the application logic, you need to build the models, build the controller, and define the URL routes. 1. Build models that are defined in a file called models.py. You can copy the sample code below and0 码力 | 4487 页 | 84.44 MB | 1 年前3
TiDB v6.5 Documentation200 class Meta: table_name = "players" For more information, refer to peewee documentation: Models and Fields. Insert data #### Insert a single record Player.create(name="test", coins=100, goods=100) from django.db import models class Player(models.Model): name = models.CharField(max_length=32, blank=False, null=False) coins = models.IntegerField(default=100) goods = models.IntegerField(default=1) 1) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) For more information, refer to Django models. Insert data #### insert a single object player0 码力 | 5282 页 | 99.69 MB | 1 年前3
TiDB v7.1 Documentation201 class Meta: table_name = "players" For more information, refer to peewee documentation: Models and Fields. Insert data #### Insert a single record Player.create(name="test", coins=100, goods=100) from django.db import models class Player(models.Model): name = models.CharField(max_length=32, blank=False, null=False) coins = models.IntegerField(default=100) goods = models.IntegerField(default=1) 1) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) For more information, refer to Django models. Insert data #### insert a single object player0 码力 | 5716 页 | 104.74 MB | 1 年前3
TiDB v7.6 DocumentationIntegerField(default=0) class Meta: table_name = "players" For more information, refer to peewee documentation: Models and Fields. Insert data #### Insert a single record Player.create(name="test", coins=100, goods=100) from django.db import models class Player(models.Model): 200 name = models.CharField(max_length=32, blank=False, null=False) coins = models.IntegerField(default=100) goods = models.IntegerField(default=1) IntegerField(default=1) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) For more information, refer to Django models. Insert data #### insert a single object player0 码力 | 6123 页 | 107.24 MB | 1 年前3
TiDB v7.5 Documentation181 class Meta: table_name = "players" For more information, refer to peewee documentation: Models and Fields. Insert data #### Insert a single record Player.create(name="test", coins=100, goods=100) from django.db import models class Player(models.Model): name = models.CharField(max_length=32, blank=False, null=False) coins = models.IntegerField(default=100) goods = models.IntegerField(default=1) 1) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) For more information, refer to Django models. Insert data #### insert a single object player0 码力 | 6020 页 | 106.82 MB | 1 年前3
TiDB v8.1 Documentation180 class Meta: table_name = "players" For more information, refer to peewee documentation: Models and Fields. Insert data #### Insert a single record Player.create(name="test", coins=100, goods=100) from django.db import models class Player(models.Model): name = models.CharField(max_length=32, blank=False, null=False) coins = models.IntegerField(default=100) goods = models.IntegerField(default=1) 1) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) For more information, refer to Django models. Insert data #### insert a single object player0 码力 | 6321 页 | 107.46 MB | 1 年前3
TiDB v8.0 Documentation209 class Meta: table_name = "players" For more information, refer to peewee documentation: Models and Fields. Insert data #### Insert a single record Player.create(name="test", coins=100, goods=100) from django.db import models class Player(models.Model): name = models.CharField(max_length=32, blank=False, null=False) coins = models.IntegerField(default=100) goods = models.IntegerField(default=1) 1) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) For more information, refer to Django models. Insert data #### insert a single object player0 码力 | 6327 页 | 107.55 MB | 1 年前3
共 24 条
- 1
- 2
- 3













