• Stars
    star
    138
  • Rank 264,508 (Top 6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SQL Database Toolkit for Deno

Cotton

ci GitHub release (latest by date)

SQL Database Toolkit for Deno.

  • Well-tested
  • Type-safe
  • Supports MySQL, SQLite, and PostgreSQL
  • Semantic versioning

Documentation

Getting Started

Here's an example of a Deno project that uses Cotton.

import { connect } from "https://deno.land/x/[email protected]/mod.ts";

const db = await connect({
  type: "sqlite",
  database: "db.sqlite3",
});

To use Cotton in your project, you can import cotton package from deno.land/x in your file. We highly recommend you to use semantic versioning by explicitly tell Deno which version you want to use in the import URL.

Typically, the first thing you want to do is to create a connection to a database. Here, we're using connect and pass our database configuration. You can read more about connection here.

Once our database is connected, do anything with it such as performing an SQL query.

const users = await db.query("SELECT * FROM users");

for (const user of users) {
  console.log(user); // { email: '[email protected]', age: 16, ... }
}

You can learn more about Cotton through these links. Have fun! πŸ˜ƒ

More Repositories

1

gin-bookstore

How to build a REST API with Golang using Gin and Gorm
Go
161
star
2

learn-typegraphql

How To Build a GraphQL API with TypeGraphQL and TypeORM
TypeScript
40
star
3

flask-rest-api

Fully functional CRUD RESTful API with Flask and SQLAlchemy
Python
30
star
4

learn-express-mongoose

How to Build a REST API with Express and Mongoose
JavaScript
15
star
5

django_email_login

Enable Login with Email in Django
Python
7
star
6

yt-express-mongoose

Learn how to build a RESTful API with Express and Mongoose with CRUD functionalities.
JavaScript
6
star
7

techcrunch-clone

πŸ“° TechCrunch clone app with React Native and Redux
Objective-C
4
star
8

websitex

Python
4
star
9

product-manager

πŸ“±Product manager app made with Flutter and Dart
Dart
4
star
10

typescript-decorators

A Practical Guide to TypeScript Decorators
TypeScript
3
star
11

learn-dataloader

How to Use GraphQL DataLoader
JavaScript
2
star
12

yt-django-tutorial

Learn how to build a basic CRUD web application with Django 2.2
Python
2
star
13

fullstack-mern

Minimalist boilerplate with MongoDB, Express, React, and Node.js
JavaScript
2
star
14

learn-lunr

Advanced Data Searching with Lunr.js
JavaScript
2
star
15

statefully

πŸ“¦ A tiny state container for your javascript apps
TypeScript
2
star
16

fullstack-react-graphql

Complete fullstack app boilerplate with react, graphql, docker, and typescript
TypeScript
2
star
17

prisma-typescript-boilerplate

Prisma server boilerplate with TypeScript and authentication
TypeScript
2
star
18

fullstack-graphql

Minimalist boilerplate with React, GraphQL, Express, and Webpack
JavaScript
2
star
19

learn-supertest

JavaScript
2
star
20

react-native-news

Simple React Native News App with React Navigation and NewsAPI
JavaScript
2
star
21

react-native-todo

React Native Todo App
JavaScript
1
star
22

learn-hooks

Learn React Hooks and memoizing values to increase performance
JavaScript
1
star
23

NanoChallenge3

Swift
1
star
24

yt-react-redux

Learn how to use Redux and connect with React applications
JavaScript
1
star
25

graphql-typescript

Graphql API with typeorm and graphql-yoga and docker
TypeScript
1
star
26

node-chat-app

Cool realtime chat application with Node.js and Socket.io
JavaScript
1
star
27

fullstack-mern-ts

Complete fullstack app boilerplate with react, express, docker, and typescript
TypeScript
1
star
28

preact-typescript-boilerplate

Simple preact app with typescript and parceljs
TypeScript
1
star
29

flutter-widget-basic

Simple flutter app with basic widget
Dart
1
star
30

frozzcape

Heroku app
CSS
1
star
31

CalculateEmotion

Swift
1
star
32

dotfiles

My personal dotfiles
Vim Script
1
star
33

learn-multer

Upload Files with Multer
JavaScript
1
star
34

newsfeed-app

React Native News Feed App with newsapi.org
JavaScript
1
star
35

comments

1
star
36

react-native-prisma

React Native πŸ’˜ Prisma
JavaScript
1
star
37

learn-suspense

How to Fetch Data with React Suspense
HTML
1
star
38

learn-cloud-build

Learn how to use CI with Google Cloud Build and deploy to Cloud Run
JavaScript
1
star