Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License.
 */
package ai.onnxruntime;
 
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.util.Log;
 
import ai.onnxruntime.telemetry.HttpClient;
 
/** Initializes the Android transport and platform context used by native 1DS telemetry. */
public final class TelemetryInitializer extends ContentProvider {
  private static final String TAG = "ORTTelemetry";
  private static HttpClient client;
 
  @Override
  public boolean onCreate() {
    Context context = getContext();
    if (context == null) {
      return false;
    }
 
    try {
      System.loadLibrary("onnxruntime");
      synchronized (TelemetryInitializer.class) {
        if (client == null) {
          client = new HttpClient(context.getApplicationContext());
        }
      }
      return true;
    } catch (LinkageError | RuntimeException e) {
      Log.w(TAG, "Unable to initialize telemetry", e);
      return false;
    }
  }
 
  @Override
  public Cursor query(
      Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
    return null;
  }
 
  @Override
  public String getType(Uri uri) {
    return null;
  }
 
  @Override
  public Uri insert(Uri uri, ContentValues values) {
    return null;
  }
 
  @Override
  public int delete(Uri uri, String selection, String[] selectionArgs) {
    return 0;
  }
 
  @Override
  public int update(
      Uri uri, ContentValues values, String selection, String[] selectionArgs) {
    return 0;
  }
}