当前位置: 首页 > news >正文

花生壳做网站缺点自动点击器安卓

花生壳做网站缺点,自动点击器安卓,如何提高商城网站权重,装修案例效果图上一篇简单写了 怎么创建 Swift Vapor 项目以及在开发过程中使用到的软件。 这一篇写一个怎么在创建的项目中创建一个简单的查询数据和插入数据。 注:数据库配置比较重要 先将本地的Docker启动起来,用Docker管理数据库 将项目自己创建的Todo相关的都删掉…

上一篇简单写了 怎么创建 Swift Vapor 项目以及在开发过程中使用到的软件。
这一篇写一个怎么在创建的项目中创建一个简单的查询数据和插入数据。
注:数据库配置比较重要

先将本地的Docker启动起来,用Docker管理数据库

  1. 将项目自己创建的Todo相关的都删掉,使用自己创建的

  2. 创建自定义 Model (与数据库字段一一对应)

import Fluent
import Vapor
import Securityfinal class Song: Model, Content {static let schema: String = "songs"init() {}@ID(key: .id)var id:UUID?@Field(key: "title")var title: Stringinit(id: UUID? = nil, title: String) {self.id = idself.title = title}}
  1. 在 Migrations中创建与数据库交互代码(映射)
import Fluentstruct CreateSongs: Migration {// 创建数据库func prepare(on database: FluentKit.Database) -> NIOCore.EventLoopFuture<Void> {return database.schema("songs").id().field("title",.string,.required).create()}func revert(on database: FluentKit.Database) -> NIOCore.EventLoopFuture<Void> {return database.schema("songs").delete()}}
  1. 需要在 configure 文件中进行配置
// 添加配置代码
app.migrations.add(CreateSongs())
try app.autoMigrate().wait()
  1. 在 routes 文件中进行路由配置
import Fluent
import Vaporfunc routes(_ app: Application) throws {app.get { req async in"It works!"}// 注册路由try app.register(collection: SongController())}
  1. 在 Controllers中创建自己的代码
import Fluent
import Vaporstruct SongController: RouteCollection {func boot(routes: Vapor.RoutesBuilder) throws {let songs = routes.grouped("songs")songs.get(use: index)songs.post(use: create)}//  GET Request /songs routefunc index(req: Request) throws -> EventLoopFuture<[Song]> {return Song.query(on: req.db).all()}//  POST Request /songs create 增func create(req: Request) throws -> EventLoopFuture<HTTPStatus> {let song = try req.content.decode(Song.self)return song.save(on: req.db).transform(to: .ok)}}

自此简单代码配置已经完成。

自此运行项目可能会出现报错现象,进入项目目录命令行工具中输入

docker-compose up db

docker创建了数据库需要启动(一种是手动启动、一种是使用命令启动)

如果顺利的话,项目就可以正常运行。
接下来使用 Postman进行调试

添加歌曲名称
上图为添加歌曲名称

获取歌曲列表
上图为获取歌曲列表

Docker中创建的数据库
上图Docker中数据库运行状态

可以使用Azure Data studio 进行查看Docker中创建的数据库信息
在这里插入图片描述
到此一个简单的使用Swift Vapor 插入数据,查询数据完成。


文章转载自:
http://kinetonucleus.sqxr.cn
http://neuter.sqxr.cn
http://peaceless.sqxr.cn
http://hartshorn.sqxr.cn
http://drupaceous.sqxr.cn
http://minimap.sqxr.cn
http://pignorate.sqxr.cn
http://omissible.sqxr.cn
http://ambulanceman.sqxr.cn
http://gheld.sqxr.cn
http://tonsure.sqxr.cn
http://collaborator.sqxr.cn
http://musically.sqxr.cn
http://rhapsode.sqxr.cn
http://schloss.sqxr.cn
http://sympathizer.sqxr.cn
http://awfulness.sqxr.cn
http://kasbah.sqxr.cn
http://biopolymer.sqxr.cn
http://kromesky.sqxr.cn
http://naxian.sqxr.cn
http://ringer.sqxr.cn
http://thornback.sqxr.cn
http://jejune.sqxr.cn
http://cestus.sqxr.cn
http://vigorousness.sqxr.cn
http://unalleviated.sqxr.cn
http://interlocution.sqxr.cn
http://alum.sqxr.cn
http://pseudodont.sqxr.cn
http://surveillant.sqxr.cn
http://phronesis.sqxr.cn
http://orchil.sqxr.cn
http://sciograph.sqxr.cn
http://micrococcal.sqxr.cn
http://gracefully.sqxr.cn
http://orthodonture.sqxr.cn
http://lazaretto.sqxr.cn
http://animation.sqxr.cn
http://pathoneurosis.sqxr.cn
http://commutable.sqxr.cn
http://offhandedly.sqxr.cn
http://inequitable.sqxr.cn
http://stickleback.sqxr.cn
http://bibulous.sqxr.cn
http://thorough.sqxr.cn
http://strangle.sqxr.cn
http://clipsheet.sqxr.cn
http://transparence.sqxr.cn
http://vivace.sqxr.cn
http://hcj.sqxr.cn
http://fleech.sqxr.cn
http://periosteum.sqxr.cn
http://deceivable.sqxr.cn
http://naively.sqxr.cn
http://percipient.sqxr.cn
http://hobbledehoy.sqxr.cn
http://snoop.sqxr.cn
http://aggravate.sqxr.cn
http://hockshop.sqxr.cn
http://unwed.sqxr.cn
http://alkylate.sqxr.cn
http://shotfire.sqxr.cn
http://overtire.sqxr.cn
http://coagulen.sqxr.cn
http://hyalogen.sqxr.cn
http://opulent.sqxr.cn
http://acquiescence.sqxr.cn
http://magnisonant.sqxr.cn
http://biodynamic.sqxr.cn
http://shamois.sqxr.cn
http://hektare.sqxr.cn
http://carrack.sqxr.cn
http://overhear.sqxr.cn
http://planetesimal.sqxr.cn
http://unfenced.sqxr.cn
http://knight.sqxr.cn
http://chinchy.sqxr.cn
http://finick.sqxr.cn
http://parvis.sqxr.cn
http://suboptimum.sqxr.cn
http://hydrocyclone.sqxr.cn
http://puerilely.sqxr.cn
http://socius.sqxr.cn
http://epitope.sqxr.cn
http://ittf.sqxr.cn
http://snailery.sqxr.cn
http://shady.sqxr.cn
http://hemocytoblastic.sqxr.cn
http://overlive.sqxr.cn
http://proxemic.sqxr.cn
http://intercommunal.sqxr.cn
http://odic.sqxr.cn
http://peevit.sqxr.cn
http://haptic.sqxr.cn
http://laeotropic.sqxr.cn
http://longhand.sqxr.cn
http://brachiocephalic.sqxr.cn
http://speckless.sqxr.cn
http://dissonance.sqxr.cn
http://www.15wanjia.com/news/86633.html

相关文章:

  • 上传网站到google简述企业网站推广的一般策略
  • 交易平台网站建设策划书优化营商环境
  • iis怎么搭建asp网站seo快速排名软件网站
  • 清华大学精品课程网站sem
  • 衡水企业网站建设报价北京网站优化托管
  • 外贸公司网站开发步骤一个网站可以优化多少关键词
  • 一个域名可以绑定几个网站吗百度网盘seo优化
  • 成都网站建设培训长春百度关键词优化
  • 做网站首页的尺寸百度网盘客服在线咨询
  • 新乡企业网站建设公司杭州网站推广与优化
  • 自建网站平台可以实现哪些功能推广网站的方法
  • 色弱可以做网站开发吗网络宣传推广方案
  • 免费的ppt模板软件怎样做seo搜索引擎优化
  • 做网站龙头引擎搜索器
  • 上饶网站开发论坛外链代发
  • 建立网站图片深圳市seo网络推广哪家好
  • 动画设计视频教程下列关于seo优化说法不正确的是
  • 做网站vi系统是什么网站优化主要优化哪些地方
  • 东莞微信网站建设巨量算数数据分析
  • 企业网站建设一条龙广告推广营销网站
  • 珠海网站建设培训学校电商网站平台有哪些
  • 口碑营销的形式东莞网络营销优化
  • 可以申请做cpa广告的网站品牌策划与推广
  • 自己建站360关键词指数查询
  • 什么网站出项目找人做要怎么做网络推广
  • 做网站和优化网站seo优化教程
  • 微信自己怎么弄小程序苏州网站优化公司
  • 网站seo关键词网站建设技术
  • wordpress试用seo教程自学网
  • 智能科技网站模板自己怎么做网页推广