Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions okoro_wisdom/TPSI/SvelteFormDB/Es_3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import Database from 'better-sqlite3';
const db = new Database('../SvelteFormDB/USER.db');

const query0 = db.prepare('INSERT INTO Utente (nome, cognome, eta) VALUES(?, ?, ?)');
const id1 = query0.run('Mirko', 'Bianchi', 25);
const id2 = query0.run('Mirko', 'Bianchi', 63);
const id3 = query0.run('Rosso', 'Bianchi', 5);


// const query1 = db.prepare('SELECT * FROM Utente WHERE eta > ?');
// const info1 = query1.run(18)

// const query2 = db.prepare('SELECT * FROM Utente WHERE eta = ?');
// const info2 = query2.run(16)

// const query3 = db.prepare('UPDATE Utente SET nome=@nome WHERE eta=@eta');
// const info3= query3.run({ eta: 25, nome: 'Giorno'});

// const query4 = db.prepare('DELETE FROM Utente WHERE id= ?');
// const info4 = query4.run(2);



// console.log(info1);
// console.log(info2);
// console.log(info3);
// console.log(info4);
38 changes: 38 additions & 0 deletions okoro_wisdom/TPSI/SvelteFormDB/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```sh
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```sh
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```sh
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
Binary file added okoro_wisdom/TPSI/SvelteFormDB/USER.db
Binary file not shown.
Empty file.
13 changes: 13 additions & 0 deletions okoro_wisdom/TPSI/SvelteFormDB/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": false,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}
Loading